1 | <?php |
||
16 | class ApplicationCollection extends \samsoncms\api\generator\Generic |
||
17 | { |
||
18 | /** Default generic class name */ |
||
19 | const DEFAULT_GENERIC_TYPE = 'Generic'; |
||
20 | |||
21 | /** Default control class name */ |
||
22 | const DEFAULT_GENERIC_CONTROL_TYPE = 'Control'; |
||
23 | |||
24 | /** Custom css selector in generic constructor */ |
||
25 | const DEFAULT_CUSTOM_TYPE_CSS = ''; |
||
26 | |||
27 | /** User can edit field in list of application */ |
||
28 | const DEFAULT_CUSTOM_TYPE_EDITABLE = 'false'; |
||
29 | |||
30 | /** Field can be sortable in list of application */ |
||
31 | const DEFAULT_CUSTOM_TYPE_SORTABLE = 'false'; |
||
32 | |||
33 | /** Default namespace of custom types */ |
||
34 | const DEFAULT_CUSTOM_TYPE_NAMESPACE = '\\samsonphp\\cms\\types\\'; |
||
35 | |||
36 | /** |
||
37 | * Query constructor. |
||
38 | * |
||
39 | * @param Generator $generator |
||
40 | * @param $metadata |
||
41 | */ |
||
42 | public function __construct(Generator $generator, $metadata) |
||
48 | |||
49 | /** |
||
50 | * Class uses generation part. |
||
51 | * |
||
52 | * @param \samsoncms\api\generator\metadata\GenericMetadata $metadata Entity metadata |
||
53 | */ |
||
54 | protected function createUses($metadata) |
||
61 | |||
62 | /** |
||
63 | * Class definition generation part. |
||
64 | * |
||
65 | * @param \samsoncms\api\generator\metadata\ApplicationMetadata $metadata Entity metadata |
||
66 | */ |
||
67 | protected function createDefinition($metadata) |
||
73 | |||
74 | /** |
||
75 | * Class constructor generation part. |
||
76 | * |
||
77 | * @param \samsoncms\api\generator\metadata\ApplicationMetadata $metadata Entity metadata |
||
78 | */ |
||
79 | protected function createConstructor($metadata) |
||
121 | |||
122 | /** |
||
123 | * Create generic constructor for collection. |
||
124 | * |
||
125 | * @param $customType |
||
126 | * @param $name |
||
127 | * @param $description |
||
128 | * @param int $type |
||
129 | * @param string $css |
||
130 | * @param string $editable |
||
131 | * @param string $sortable |
||
132 | * |
||
133 | * @return string |
||
134 | */ |
||
135 | public function createCollectionField( |
||
159 | } |
||
160 | //[PHPCOMPRESSOR(remove,end)] |
||
161 |