Abstract class where all types of column operations extend from
Author: Antonio Ramirez (amigo.cobos@gmail.com)
Inheritance: extends CWidget
Example #1
0
 /**
  * Widget's initialization method
  * @throws CException
  */
 public function init()
 {
     parent::init();
     if (!in_array($this->column->type, $this->supportedTypes)) {
         throw new CException(Yii::t('zii', 'Unsupported column type. Supported column types are: "{types}"', array('{types}' => implode(', ', $this->supportedTypes))));
     }
 }
 /**
  * Widget's initialization
  * @throws CException
  */
 public function init()
 {
     if (empty($this->types)) {
         throw new CException(Yii::t('zii', '"{attribute}" attribute must be defined', array('{attribute}' => 'types')));
     }
     foreach ($this->types as $type) {
         if (!isset($type['label'])) {
             throw new CException(Yii::t('zii', 'The "label" of a type must be defined.'));
         }
     }
     parent::init();
 }