Пример #1
0
 /**
  * Method to override the nextAction function to include automatic inclusion
  * of mode and restriction
  *
  * @param  string $action Action to perform next.
  * @param  array  $params Parameters to pass to action.
  * @return NULL
  */
 public function nextAction($action, $params = array(), $module = 'filemanager')
 {
     // If parameters is NULL, convert to array
     if ($params == NULL) {
         $params = array();
     }
     // Add Param for Mode
     if (is_array($params) && !array_key_exists('mode', $params) && $this->getParam('mode') != '') {
         $params['mode'] = $this->getParam('mode');
     }
     // Add Param for Restriction
     if (is_array($params) && !array_key_exists('restriction', $params) && $this->getParam('restriction') != '') {
         $params['restriction'] = $this->getParam('restriction');
     }
     // Add Param for Name - File/Image Select
     if (is_array($params) && !array_key_exists('name', $params) && $this->getParam('name') != '') {
         $params['name'] = $this->getParam('name');
     }
     if (is_array($params) && !array_key_exists('context', $params) && $this->getParam('context') != '') {
         $params['context'] = $this->getParam('context');
     }
     if (is_array($params) && !array_key_exists('workgroup', $params) && $this->getParam('workgroup') != '') {
         $params['workgroup'] = $this->getParam('workgroup');
     }
     return parent::nextAction($action, $params, $module);
 }