/**
  * Method to publish an element.
  *
  * @access	public
  * @return	void
  */
 public function publish()
 {
     CkJSession::checkToken() or CkJSession::checkToken('get') or jexit(JText::_('JINVALID_TOKEN'));
     $this->_result = $result = parent::publish();
     $model = $this->getModel();
     //Define the redirections
     switch ($this->getLayout() . '.' . $this->getTask()) {
         case 'default.publish':
             $this->applyRedirection($result, array('stay', 'com_rtiprint.operatingsystems.default'), array('cid[]' => null));
             break;
         case 'default.unpublish':
             $this->applyRedirection($result, array('stay', 'com_rtiprint.operatingsystems.default'), array('cid[]' => null));
             break;
         case 'default.archive':
             $this->applyRedirection($result, array('stay', 'com_rtiprint.operatingsystems.default'), array('cid[]' => null));
             break;
         case 'default.trash':
             $this->applyRedirection($result, array('stay', 'com_rtiprint.operatingsystems.default'), array('cid[]' => null));
             break;
         default:
             $this->applyRedirection($result, array('stay', 'stay'));
             break;
     }
 }
Beispiel #2
0
 /**
  * Constructor
  *
  * @access	public
  * @param	array	$config	An optional associative array of configuration settings.
  * @return	void
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
     $app = JFactory::getApplication();
 }