Example #1
0
 public function actions()
 {
     $actions = array_merge(parent::actions(), array('ajaxGetModelAutocomplete' => array('class' => 'application.components.actions.AjaxGetModelAutocompleteAction'), 'x2GridViewMassAction' => array('class' => 'X2GridViewMassActionAction'), 'inlineEmail' => array('class' => 'InlineEmailAction')));
     if ($this->module) {
         $module = Modules::model()->findByAttributes(array('name' => $this->module->name));
         if ($module->enableRecordAliasing) {
             $actions = array_merge($actions, RecordAliases::getActions());
         }
     }
     if ($this->modelClass !== '') {
         $modelClass = $this->modelClass;
         if ($modelClass::model()->asa('X2ModelConversionBehavior')) {
             $actions = array_merge($actions, X2ModelConversionBehavior::getActions());
         }
     }
     return $actions;
 }
Example #2
0
 /**
  * Allow special PhoneGap parameters to persist across redirects
  */
 public function redirect($url, $terminate = true, $statusCode = 302)
 {
     $params = array();
     if (isset($_GET['x2ajax'])) {
         $params['x2ajax'] = $_GET['x2ajax'];
     }
     $url = UrlUtil::mergeParams($url, $params);
     return parent::redirect($url, $terminate, $statusCode);
 }