1 | <?php |
||
9 | abstract class SimpleCrud extends AbstractEntity implements EntityInterface |
||
10 | { |
||
11 | protected $searchFields; |
||
12 | |||
13 | /** |
||
14 | * Returns the simple-crud entity |
||
15 | * |
||
16 | * @return SimpleCrud\Entity |
||
17 | */ |
||
18 | abstract protected function getDbEntity(); |
||
19 | |||
20 | protected function getQuery(SearchQuery $search = null, &$page = null) |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | public function search(SearchQuery $search = null) |
||
72 | |||
73 | /** |
||
74 | * {@inheritdoc} |
||
75 | */ |
||
76 | public function create(array $data) |
||
84 | |||
85 | /** |
||
86 | * {@inheritdoc} |
||
87 | */ |
||
88 | public function read($id) |
||
96 | |||
97 | /** |
||
98 | * {@inheritdoc} |
||
99 | */ |
||
100 | public function update($id, array $data) |
||
108 | |||
109 | /** |
||
110 | * {@inheritdoc} |
||
111 | */ |
||
112 | public function delete($id) |
||
118 | |||
119 | /** |
||
120 | * {@inheritdoc} |
||
121 | */ |
||
122 | public function getLabel($id, array $data) |
||
126 | |||
127 | /** |
||
128 | * {@inheritdoc} |
||
129 | */ |
||
130 | protected function getFirstField() |
||
140 | |||
141 | protected function save(Row $row, array $data) |
||
157 | } |
||
158 |