2014-06-10 15:18:49 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
App::uses('AppModel', 'Model');
|
|
|
|
|
2018-07-19 11:48:22 +02:00
|
|
|
class TemplateElementAttribute extends AppModel
|
|
|
|
{
|
|
|
|
public $actsAs = array('Containable');
|
2016-08-25 11:38:37 +02:00
|
|
|
|
2018-07-19 11:48:22 +02:00
|
|
|
public $belongsTo = array('TemplateElement');
|
2016-08-25 11:38:37 +02:00
|
|
|
|
2018-07-19 11:48:22 +02:00
|
|
|
public $validate = array(
|
|
|
|
'name' => array(
|
|
|
|
'valueNotEmpty' => array(
|
|
|
|
'rule' => array('valueNotEmpty'),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'description' => array(
|
|
|
|
'valueNotEmpty' => array(
|
|
|
|
'rule' => array('valueNotEmpty'),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
'category' => array(
|
|
|
|
'rule' => array('comparison', '!=', 'Select Category'),
|
|
|
|
'message' => 'Please choose a category.'
|
|
|
|
),
|
|
|
|
'type' => array(
|
|
|
|
'rule' => array('comparison', '!=', 'Select Type'),
|
|
|
|
'message' => 'Please choose a type.'
|
|
|
|
),
|
|
|
|
);
|
|
|
|
public function beforeValidate($options = array())
|
|
|
|
{
|
|
|
|
parent::beforeValidate();
|
|
|
|
}
|
2014-06-10 15:18:49 +02:00
|
|
|
}
|