Пример #1
0
 /**
  * Constructor
  *
  * @param string $id ID
  * @param string $table Table
  * @param string $ds Datasource
  */
 public function __construct($id = false, $table = null, $ds = null)
 {
     parent::__construct($id, $table, $ds);
     //validation for cms updation
 }
Пример #2
0
 public function __construct()
 {
     parent::__construct();
     $this->validate = array('id' => array('rule' => '/^[a-z][a-z0-9_\\.]{2,127}$/i', 'message' => __('Must start with a letter, can only contain letters, numbers, underscore, and periods', true)), 'value' => array('rule' => '/^.*$/'));
 }
Пример #3
0
 /**
  * __construct
  *
  * @param mixed $id
  * @param string $table
  * @param DataSource $ds
  */
 public function __construct($id = false, $table = null, $ds = null)
 {
     parent::__construct($id, $table, $ds);
     $this->settingsPath = APP . 'Config' . DS . 'settings.json';
 }
Пример #4
0
 function __construct($id = false, $table = null, $ds = null)
 {
     parent::__construct($id, $table, $ds);
     $this->validate = array('key' => array('notempty' => array('rule' => array('notempty'), 'message' => __('cannot be left empty', true))), 'title' => array('notempty' => array('rule' => array('notempty'), 'message' => __('cannot be left empty', true))), 'description' => array('notempty' => array('rule' => array('notempty'), 'message' => __('cannot be left empty', true))), 'input_type' => array('notempty' => array('rule' => array('notempty'), 'message' => __('cannot be left empty', true))));
 }