public function onBeforeControllerGet(AnEvent $event)
    {
        parent::onBeforeControllerGet($event);

        //just in case
        if (!$this->getController()->isIdentifiable()) {
            return;
        }

        //if vieweing one actor
        if ($item = $this->getController()->getItem()) {
            //for now render actor socialgraph bar here
            if ($this->getController()->get == 'graph') {
                $this->_configureGraphBar();
            } else {
                $this->setActor(null);

                $this->setTitle(sprintf(AnTranslator::_('COM-ACTORS-PROFILE-ACTORBAR-TITLE'), $item->getName()));
            }
        }
        //if viewing a list of actors related to another actor
        elseif ($this->getController()->isOwnable() && $this->getController()->actor) {
            $this->_configureBar();
        }
    }
public function onBeforeControllerGet(AnEvent $event)
    {
        parent::onBeforeControllerGet($event);

        //just in case
        if (!$this->getController()->isIdentifiable()) {
            return;
        }

        //if vieweing one actor
        if ($item = $this->getController()->getItem()) {
            //for now render actor socialgraph bar here
            if ($this->getController()->get == 'graph') {
                $this->_configureGraphBar();
            } else {
                $this->setActor(null);

                $this->setTitle(sprintf(AnTranslator::_('COM-ACTORS-PROFILE-ACTORBAR-TITLE'), $item->getName()));
            }
        }
        //if viewing a list of actors related to another actor
        elseif ($this->getController()->isOwnable() && $this->getController()->actor) {
            $this->_configureBar();
        }
    }
public function onBeforeControllerGet ( AnEvent $ event ) { parent :: onBeforeControllerGet ( $ event ) ; //just in case if ( ! $ this -> getController ( ) -> isIdentifiable ( ) ) { return ; } //if vieweing one actor if ( $ item = $ this -> getController ( ) -> getItem ( ) ) { //for now render actor socialgraph bar here if ( $ this -> getController ( ) -> get == 'graph' ) { $ this -> _configureGraphBar ( ) ; } else { $ this -> setActor ( null ) ; $ this -> setTitle ( sprintf ( AnTranslator :: _ ( 'COM-ACTORS-PROFILE-ACTORBAR-TITLE' ) , $ item -> getName ( ) ) ) ; } } //if viewing a list of actors related to another actor elseif ( $ this -> getController ( ) -> isOwnable ( ) && $ this -> getController ( ) -> actor ) { $ this -> _configureBar ( ) ; } }
Set the header for the default actor.

@todo very large function perhaps it should be done as command chain

@param AnCommandContext $context Context parameter

@return AnDomainEntitysetDefault
Set the header for the default actor .