Esempio n. 1
0
 protected function _initialize(KConfig $config)
 {  
     //Force the view to prevent a redirect
     KRequest::set('get.view', 'results');
      
     parent::_initialize($config);
 }
Esempio n. 2
0
 /**
  * Push the controller data into the document
  * 
  * This function divert the standard behavior and will push specific controller data
  * into the document
  *
  * @return  KDispatcherDefault
  */
 protected function _actionRender(KCommandContext $context)
 {
     $controller = KFactory::get($this->getController());
     $view = KFactory::get($controller->getView());
     $document = KFactory::get('lib.joomla.document');
     $document->setMimeEncoding($view->mimetype);
     return parent::_actionRender($context);
 }
Esempio n. 3
0
 /**
  * Push the controller data into the document
  *
  * This function divert the standard behavior and will push specific controller data
  * into the document
  *
  * @return  KDispatcherDefault
  */
 protected function _actionRender(KCommandContext $context)
 {
     $view = $this->getController()->getView();
     $document = JFactory::getDocument();
     $document->setMimeEncoding($view->mimetype);
     return parent::_actionRender($context);
 }
 /**
  * Set the mimetype of the document and hide the menu if required
  *
  * @return  KDispatcherDefault
  */
 protected function _actionRender(KCommandContext $context)
 {
     $view = $this->getController()->getView();
     //Set the document mimetype
     JFactory::getDocument()->setMimeEncoding($view->mimetype);
     //Disabled the application menubar
     if ($this->getController()->isEditable() && KInflector::isSingular($view->getName())) {
         KRequest::set('get.hidemainmenu', 1);
     }
     return parent::_actionRender($context);
 }
Esempio n. 5
0
 /**
  * Push the controller data into the document
  * 
  * This function divert the standard behavior and will push specific controller data
  * into the document
  *
  * @return  KDispatcherDefault
  */
 protected function _actionRender(KCommandContext $context)
 {
     $controller = KFactory::get($this->getController());
     $view = $controller->getView();
     $document = KFactory::get('lib.joomla.document');
     $document->setMimeEncoding($view->mimetype);
     if ($view instanceof ComDefaultViewHtml) {
         $document->setBuffer($view->getToolbar()->render(), 'modules', 'toolbar');
         $document->setBuffer($view->getToolbar()->renderTitle(), 'modules', 'title');
         if (KInflector::isSingular($view->getName()) && !KRequest::has('get.hidemainmenu')) {
             KRequest::set('get.hidemainmenu', 1);
         }
         if (isset($view->views)) {
             foreach ($view->views as $name => $title) {
                 $active = $name == strtolower($view->getName());
                 $component = $this->_identifier->package;
                 JSubMenuHelper::addEntry(JText::_($title), 'index.php?option=com_' . $component . '&view=' . $name, $active);
             }
         }
     }
     return parent::_actionRender($context);
 }