protected function dispatchHooks($scopeType, \stdClass $entity)
    {
        $fullScopeClass = 'Drupal\\DrupalExtension\\Hook\\Scope\\' . $scopeType;
        $scope = new $fullScopeClass($this->getDrupal()->getEnvironment(), $this, $entity);
        $callResults = $this->dispatcher->dispatchScopeHooks($scope);

        // The dispatcher suppresses exceptions, throw them here if there are any.
        foreach ($callResults as $result) {
            if ($result->hasException()) {
                $exception = $result->getException();
                throw $exception;
            }
        }
    }
protected function dispatchHooks($scopeType, \stdClass $entity)
    {
        $fullScopeClass = 'Drupal\\DrupalExtension\\Hook\\Scope\\' . $scopeType;
        $scope = new $fullScopeClass($this->getDrupal()->getEnvironment(), $this, $entity);
        $callResults = $this->dispatcher->dispatchScopeHooks($scope);

        // The dispatcher suppresses exceptions, throw them here if there are any.
        foreach ($callResults as $result) {
            if ($result->hasException()) {
                $exception = $result->getException();
                throw $exception;
            }
        }
    }
protected function dispatchHooks ( $ scopeType , \ stdClass $ entity ) { $ fullScopeClass = 'Drupal\\DrupalExtension\\Hook\\Scope\\' . $ scopeType ; $ scope = new $ fullScopeClass ( $ this -> getDrupal ( ) -> getEnvironment ( ) , $ this , $ entity ) ; $ callResults = $ this -> dispatcher -> dispatchScopeHooks ( $ scope ) ; // The dispatcher suppresses exceptions, throw them here if there are any. foreach ( $ callResults as $ result ) { if ( $ result -> hasException ( ) ) { $ exception = $ result -> getException ( ) ; throw $ exception ; } } }
Dispatch scope hooks.

@param string $scope
The entity scope to dispatch.
@param \stdClass $entity
The entity.
Dispatch scope hooks .