/**
  * GridActionToggleProperty::__construct()
  *
  * @param array $params
  * @return void
  */
 public function __construct($params = array())
 {
     $this->useButton = true;
     // par defaut ici
     $this->allowEmptySelection = false;
     parent::__construct($params);
     if (!isset($params['Property'])) {
         trigger_error('Property est requis pour une action ToggleProperty', E_USER_ERROR);
     }
     $this->property = $params['Property'];
     if (isset($params['ToggleOnLabel'])) {
         $this->toggleOnLabel = $params['ToggleOnLabel'];
     } else {
         $this->toggleOnLabel = A_ACTIVATE;
     }
     if (isset($params['ToggleOnGlyph'])) {
         $this->toggleOnGlyph = $params['ToggleOnGlyph'];
     }
     if (isset($params['ToggleOnValue'])) {
         $this->toggleOnValue = $params['ToggleOnValue'];
     }
     if (isset($params['ToggleOffLabel'])) {
         $this->toggleOffLabel = $params['ToggleOffLabel'];
     } else {
         $this->toggleOffLabel = A_DISABLE;
     }
     if (isset($params['ToggleOffGlyph'])) {
         $this->toggleOffGlyph = $params['ToggleOffGlyph'];
     }
     if (isset($params['ToggleOffValue'])) {
         $this->toggleOffValue = $params['ToggleOffValue'];
     }
 }
Exemple #2
0
 /**
  * GridActionDelete::__construct()
  *
  * @param array $params
  * @return void
  */
 public function __construct($params = array())
 {
     $this->allowEmptySelection = false;
     $this->confirmMessage = I_DELETE_ITEMS;
     if (!isset($params['GlyphEnabled'])) {
         $params['GlyphEnabled'] = 'images/sup.gif';
     }
     if (!isset($params['GlyphDisabled'])) {
         $params['GlyphDisabled'] = 'images/sup_no.gif';
     }
     if (!isset($params['Caption'])) {
         $params['Caption'] = A_DELETE;
     }
     parent::__construct($params);
     if (isset($params['EntityType'])) {
         $this->_entityType = $params['EntityType'];
     }
     if (isset($params['Query'])) {
         $this->_query = $params['Query'];
     }
     if (isset($params['TransmitedArrayName'])) {
         $this->transmitedArrayName = $params['TransmitedArrayName'];
     } else {
         $this->transmitedArrayName = 'Id';
         trigger_error("TransmitedArrayName=>'Array name' has not been" . " defined. 'Id' was chosen by defect", E_USER_NOTICE);
     }
 }
Exemple #3
0
 /**
  * GridActionRedirect::__construct()
  *
  * @access public
  * @param array $params
  * @return void
  */
 public function __construct($params = array())
 {
     // Par defaut ici
     $this->allowEmptySelection = false;
     parent::__construct($params);
     if (isset($params['URL'])) {
         $this->_URL = $params['URL'];
     }
     if (isset($params['TransmitedArrayName'])) {
         $this->transmitedArrayName = $params['TransmitedArrayName'];
     }
 }
Exemple #4
0
 /**
  * GridActionJS::__construct()
  *
  * @param array $params
  * @return void
  */
 public function __construct($params = array())
 {
     if (false == isset($params['Caption'])) {
         $params['Caption'] = A_VALIDATE;
     }
     if (false == isset($params['GlyphEnabled'])) {
         $params['GlyphEnabled'] = 'images/ok.gif';
     }
     if (false == isset($params['GlyphDisabled'])) {
         $params['GlyphDisabled'] = 'images/ok_no.gif';
     }
     // Les instructions js a executer
     if (!isset($params['jsActionArray'])) {
         $params['jsActionArray'] = 'alert(\'Error\')';
         trigger_error("jsActionArray has not been defined. " . "(GridActionJS)", E_USER_NOTICE);
     }
     $this->jsActionArray = $params['jsActionArray'];
     // Par defaut ici
     $this->withTriggerAction = false;
     parent::__construct($params);
 }
Exemple #5
0
 /**
  * GridActionSeparator::__construct()
  *
  * @param array $params
  * @return void
  */
 public function __construct($params = array())
 {
     parent::__construct($params);
 }