for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Item option item
*
* @author Alexey Krupskiy <[email protected]>
* @link http://inji.ru/
* @copyright 2015 Alexey Krupskiy
* @license https://github.com/injitools/cms-Inji/blob/master/LICENSE
*/
namespace Ecommerce\UserAdds\Field;
class Item extends \Model {
public static $objectName = 'Элемент коллекции поля формы';
public static $cols = [
//Основные параметры
'useradds_field_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'field'],
'value' => ['type' => 'text'],
'data' => ['type' => 'textarea'],
//Системные
'weight' => ['type' => 'number'],
'date_create' => ['type' => 'dateTime']
];
public static $labels = [
'value' => 'Значение',
'data' => 'Дополнительные данные',
public static $dataManagers = [
'manager' => [
'cols' => ['value', 'data', 'date_create']
]
public static $forms = [
'map' => [
['value', 'data']
public function name() {
return $this->value;
}
public static function relations() {
return [
'field' => [
'model' => 'Ecommerce\Delivery\Field',
'col' => 'useradds_field_id'