1 | <?php |
||
15 | class items extends base_mapper |
||
16 | { |
||
17 | /** @var \phpbb\config\config */ |
||
18 | protected $config; |
||
19 | |||
20 | /** @var \blitze\sitemaker\services\menus\nestedset */ |
||
21 | protected $tree; |
||
22 | |||
23 | /** @var string */ |
||
24 | protected $_entity_class = 'blitze\sitemaker\model\menus\entity\item'; |
||
25 | |||
26 | /** @var string */ |
||
27 | protected $_entity_pkey = 'item_id'; |
||
28 | |||
29 | /** |
||
30 | * Constructor |
||
31 | * |
||
32 | * @param \phpbb\db\driver\driver_interface $db Database object |
||
33 | * @param \blitze\sitemaker\model\base_collection $collection Entity collection |
||
34 | * @param \blitze\sitemaker\model\mapper_factory $mapper_factory Mapper factory object |
||
35 | * @param string $entity_table Menu Items table |
||
36 | * @param \phpbb\config\config $config Config object |
||
37 | */ |
||
38 | 42 | public function __construct(\phpbb\db\driver\driver_interface $db, \blitze\sitemaker\model\base_collection $collection, \blitze\sitemaker\model\mapper_factory $mapper_factory, $entity_table, \phpbb\config\config $config) |
|
49 | |||
50 | 11 | public function load(array $condition = array()) |
|
63 | |||
64 | 26 | public function find(array $condition = array()) |
|
79 | |||
80 | 7 | public function save($entity) |
|
95 | |||
96 | 7 | public function add_items($menu_id, $parent_id, $string) |
|
112 | |||
113 | 3 | public function update_items($menu_id, array $items) |
|
119 | |||
120 | /** |
||
121 | * Create the entity |
||
122 | */ |
||
123 | 32 | public function create_entity(array $row) |
|
127 | |||
128 | 6 | protected function prep_items_for_storage($items) |
|
139 | |||
140 | 16 | protected function get_sql_where($menu_id) |
|
144 | } |
||
145 |