protected function _layoutDefault()
    {
        $context = new AnCommandContext();

        $context->gadgets = new LibBaseTemplateObjectContainer();
        $context->actor = $this->_state->getItem();
        $context->composers = new LibBaseTemplateObjectContainer();
        $context->commands = $this->getTemplate()->renderHelper('toolbar.commands', 'toolbar');
        $context->profile = new AnConfig();

        $context->gadgets->insert('socialgraph', array(
            'title' => translate(array('COM-ACTORS-GADGET-LABEL-SOCIALGRAPH', 'COM-'.strtoupper($this->getIdentifier()->package).'-GADGET-LABEL-SOCIALGRAPH')),
            'url' => $context->actor->getURL().'&get=graph&layout=gadget_profile',
            'title_url' => $context->actor->getURL().'&get=graph',
        ));

        if ($context->actor->authorize('access')) {

            $context->actor->components->registerEventDispatcher($this->getService('anahita:event.dispatcher'));

            $this->getService('anahita:event.dispatcher')->dispatchEvent('onProfileDisplay', $context);

            dispatch_plugin('profile.onDisplay', array('actor' => $this->_state->getItem(), 'profile' => $context->profile));

            $this->profile = $context->profile;

            if (count($context->profile) > 0) {
                $context->gadgets->insert('information', array(
                    'title' => translate(array('COM-ACTORS-GADGET-LABEL-ACTOR-INFO', 'COM-'.strtoupper($this->getIdentifier()->package).'-GADGET-LABEL-ACTOR-INFO')),
                    'content' => $this->load('info'),
                ));
            }
        }

        $context->gadgets->sort(array('stories', 'information'));

        $this->set(array(
            'commands' => $context->commands,
            'gadgets' => $context->gadgets,
            'composers' => $context->composers,
        ));
    }
protected function _layoutDefault()
    {
        $context = new AnCommandContext();

        $context->gadgets = new LibBaseTemplateObjectContainer();
        $context->actor = $this->_state->getItem();
        $context->composers = new LibBaseTemplateObjectContainer();
        $context->commands = $this->getTemplate()->renderHelper('toolbar.commands', 'toolbar');
        $context->profile = new AnConfig();

        $context->gadgets->insert('socialgraph', array(
            'title' => translate(array('COM-ACTORS-GADGET-LABEL-SOCIALGRAPH', 'COM-'.strtoupper($this->getIdentifier()->package).'-GADGET-LABEL-SOCIALGRAPH')),
            'url' => $context->actor->getURL().'&get=graph&layout=gadget_profile',
            'title_url' => $context->actor->getURL().'&get=graph',
        ));

        if ($context->actor->authorize('access')) {

            $context->actor->components->registerEventDispatcher($this->getService('anahita:event.dispatcher'));

            $this->getService('anahita:event.dispatcher')->dispatchEvent('onProfileDisplay', $context);

            dispatch_plugin('profile.onDisplay', array('actor' => $this->_state->getItem(), 'profile' => $context->profile));

            $this->profile = $context->profile;

            if (count($context->profile) > 0) {
                $context->gadgets->insert('information', array(
                    'title' => translate(array('COM-ACTORS-GADGET-LABEL-ACTOR-INFO', 'COM-'.strtoupper($this->getIdentifier()->package).'-GADGET-LABEL-ACTOR-INFO')),
                    'content' => $this->load('info'),
                ));
            }
        }

        $context->gadgets->sort(array('stories', 'information'));

        $this->set(array(
            'commands' => $context->commands,
            'gadgets' => $context->gadgets,
            'composers' => $context->composers,
        ));
    }
protected function _layoutDefault ( ) { $ context = new AnCommandContext ( ) ; $ context -> gadgets = new LibBaseTemplateObjectContainer ( ) ; $ context -> actor = $ this -> _state -> getItem ( ) ; $ context -> composers = new LibBaseTemplateObjectContainer ( ) ; $ context -> commands = $ this -> getTemplate ( ) -> renderHelper ( 'toolbar.commands' , 'toolbar' ) ; $ context -> profile = new AnConfig ( ) ; $ context -> gadgets -> insert ( 'socialgraph' , array ( 'title' => translate ( array ( 'COM-ACTORS-GADGET-LABEL-SOCIALGRAPH' , 'COM-' . strtoupper ( $ this -> getIdentifier ( ) -> package ) . '-GADGET-LABEL-SOCIALGRAPH' ) ) , 'url' => $ context -> actor -> getURL ( ) . '&get=graph&layout=gadget_profile' , 'title_url' => $ context -> actor -> getURL ( ) . '&get=graph' , ) ) ; if ( $ context -> actor -> authorize ( 'access' ) ) { $ context -> actor -> components -> registerEventDispatcher ( $ this -> getService ( 'anahita:event.dispatcher' ) ) ; $ this -> getService ( 'anahita:event.dispatcher' ) -> dispatchEvent ( 'onProfileDisplay' , $ context ) ; dispatch_plugin ( 'profile.onDisplay' , array ( 'actor' => $ this -> _state -> getItem ( ) , 'profile' => $ context -> profile ) ) ; $ this -> profile = $ context -> profile ; if ( count ( $ context -> profile ) > 0 ) { $ context -> gadgets -> insert ( 'information' , array ( 'title' => translate ( array ( 'COM-ACTORS-GADGET-LABEL-ACTOR-INFO' , 'COM-' . strtoupper ( $ this -> getIdentifier ( ) -> package ) . '-GADGET-LABEL-ACTOR-INFO' ) ) , 'content' => $ this -> load ( 'info' ) , ) ) ; } } $ context -> gadgets -> sort ( array ( 'stories' , 'information' ) ) ; $ this -> set ( array ( 'commands' => $ context -> commands , 'gadgets' => $ context -> gadgets , 'composers' => $ context -> composers , ) ) ; }
Default layout.
Default layout .