示例#1
0
 /**
  * Before _actionGet controller event
  *
  * @param  KEvent $event Event object 
  * 
  * @return string
  */
 public function onBeforeControllerGet(KEvent $event)
 {
     parent::onBeforeControllerGet($event);
     if ($this->getController()->isOwnable() && $this->getController()->actor) {
         $actor = pick($this->getController()->actor, get_viewer());
         $this->setTitle(sprintf(JText::_('COM-STORIES-HEADER-STORIES'), $actor->name));
         $this->setActor($actor);
     }
 }
示例#2
0
 /**
  * Before controller action
  *
  * @param  KEvent $event Event object 
  * 
  * @return string
  */
 public function onBeforeControllerGet(KEvent $event)
 {
     parent::onBeforeControllerGet($event);
     $name = $this->getController()->getIdentifier()->name;
     if ($name != 'order') {
         return;
     }
     $viewer = $this->getController()->viewer;
     $actor = pick($this->getController()->actor, $viewer);
     $this->setActor($actor);
     $this->setTitle(JText::sprintf('COM-SUBSCRIPTIONS-ACTOR-HEADER-TITLE-ORDER', $actor->name));
 }
示例#3
0
 /**
  * Before controller action
  *
  * @param  KEvent $event Event object 
  * 
  * @return string
  */
 public function onBeforeControllerGet(KEvent $event)
 {
     parent::onBeforeControllerGet($event);
     $name = $this->getController()->getIdentifier()->name;
     if ($name != 'order') {
         return;
     }
     $viewer = $this->getController()->viewer;
     $actor = $this->getController()->actor;
     if (!$actor) {
         return;
     }
     $this->setActor($actor);
     $this->setTitle(JText::sprintf('COM-SUBSCRIPTIONS-ACTOR-HEADER-TITLE-ORDER', $actor->name));
     //create navigations
     $this->addNavigation('subscriptions-orders', JText::_('COM-SUBSCRIPTIONS-TRANSACTIONS-MENU-ITEM'), array('option' => 'com_subscriptions', 'view' => 'orders', 'oid' => $actor->id));
 }
示例#4
0
 /**
  * Before _actionGet controller event.
  *
  * @param KEvent $event Event object
  *
  * @return string
  */
 public function onBeforeControllerGet(KEvent $event)
 {
     $this->setActor(get_viewer());
     parent::onBeforeControllerGet($event);
     $data = $event->data;
     $viewer = get_viewer();
     $actor = $viewer;
     $layout = pick($this->getController()->layout, 'default');
     $name = $this->getController()->getIdentifier()->name;
     if ($name == 'connection') {
         $name = $this->getController()->service;
     }
     $this->setTitle(JText::sprintf('COM-INVITES-ACTOR-HEADER-' . strtoupper($name) . 'S', $actor->name));
     //create navigations
     $this->addNavigation('email', JText::_('COM-INVITES-LINK-EMAIL'), 'option=com_invites&view=email', $name == 'email');
     if (ComConnectHelperApi::enabled('facebook')) {
         $this->addNavigation('facebook', JText::_('COM-INVITES-LINK-FACEBOOK'), 'option=com_invites&view=connections&service=facebook', $name == 'facebook');
     }
 }
示例#5
0
 /**
  * Set the header for the default actor
  *
  * @todo very large function perhaps it should be done as command chain
  *
  * @param KCommandContext $context Context parameter
  *
  * @return AnDomainEntitysetDefault
  */
 public function onBeforeControllerGet(KEvent $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(JText::_('COM-ACTORS-PROFILE-ACTORBAR-TITLE'), $item->getName()));
         }
     } elseif ($this->getController()->isOwnable() && $this->getController()->actor) {
         $this->_configureBar();
     }
 }