public function onResolveSubject(SubjectEvent $event)
    {
        $params = $event->getParameters();

        if (array_key_exists('type', $params)) {
            if ($params['type'] == 'page') {
                $event->setSubject($this->createPageSubject());
                $event->stopPropagation();
            } elseif ($params['type'] == 'global') {
                $event->setSubject($this->createGlobalSubject());
                $event->stopPropagation();
            }
        }
    }
public function onResolveSubject(SubjectEvent $event)
    {
        $params = $event->getParameters();

        if (array_key_exists('type', $params)) {
            if ($params['type'] == 'page') {
                $event->setSubject($this->createPageSubject());
                $event->stopPropagation();
            } elseif ($params['type'] == 'global') {
                $event->setSubject($this->createGlobalSubject());
                $event->stopPropagation();
            }
        }
    }
public function onResolveSubject ( SubjectEvent $ event ) { $ params = $ event -> getParameters ( ) ; if ( array_key_exists ( 'type' , $ params ) ) { if ( $ params [ 'type' ] == 'page' ) { $ event -> setSubject ( $ this -> createPageSubject ( ) ) ; $ event -> stopPropagation ( ) ; } elseif ( $ params [ 'type' ] == 'global' ) { $ event -> setSubject ( $ this -> createGlobalSubject ( ) ) ; $ event -> stopPropagation ( ) ; } } }
Resolve subject event handler.

@param SubjectEvent $event
Resolve subject event handler .