2014-06-10 15:18:49 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
App::uses('AppModel', 'Model');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* TemplateElementAttribute Model
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
class TemplateElementAttribute extends AppModel {
|
|
|
|
public $actsAs = array('Containable');
|
|
|
|
public $belongsTo = array('TemplateElement');
|
2014-06-12 13:59:54 +02:00
|
|
|
|
|
|
|
public $validate = array(
|
|
|
|
'name' => array(
|
|
|
|
'rule' => 'notEmpty',
|
|
|
|
'message' => 'Please enter a Name',
|
|
|
|
),
|
|
|
|
'description' => array(
|
|
|
|
'rule' => 'notEmpty',
|
|
|
|
'message' => 'Please enter a Description',
|
|
|
|
),
|
|
|
|
'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
|
|
|
}
|