/** * Constructor * * @return void */ public function __construct($id = false, $table = null, $ds = null) { parent::__construct($id, $table, $ds); $this->validate = array('foreign_key' => array('required' => array('rule' => array('notEmpty'), 'required' => true, 'allowEmpty' => false, 'message' => __d('categories', 'Foreign key can not be empty'))), 'category_id' => array('required' => array('rule' => array('notEmpty'), 'required' => true, 'allowEmpty' => false, 'message' => __d('categories', 'Category id can not be empty'))), 'model' => array('required' => array('rule' => array('notEmpty'), 'required' => true, 'allowEmpty' => false, 'message' => __d('categories', 'Model field can not be empty')))); }
/** * Constructor * * @param bool|string $id ID * @param string $table Table * @param string $ds Datasource */ public function __construct($id = false, $table = null, $ds = null) { $this->_associateUserModel(); parent::__construct($id, $table, $ds); $this->_setupBehaviors(); }