1 | <?php |
||
24 | class FilesystemCategoryStorage extends AbstractStorage |
||
25 | { |
||
26 | /** @var string */ |
||
27 | protected $dataGroup = 'webhemi_filesystem_category'; |
||
28 | /** @var string */ |
||
29 | protected $idKey = 'id_filesystem_category'; |
||
30 | /** @var string */ |
||
31 | private $idApplication = 'fk_application'; |
||
32 | /** @var string */ |
||
33 | private $name = 'name'; |
||
34 | /** @var string */ |
||
35 | private $title = 'title'; |
||
36 | /** @var string */ |
||
37 | private $description = 'description'; |
||
38 | /** @var string */ |
||
39 | private $dateCreated = 'date_created'; |
||
40 | /** @var string */ |
||
41 | private $dateModified = 'date_modified'; |
||
42 | |||
43 | /** |
||
44 | * Populates an entity with storage data. |
||
45 | * |
||
46 | * @param EntityInterface $dataEntity |
||
47 | * @param array $data |
||
48 | * @return void |
||
49 | */ |
||
50 | protected function populateEntity(EntityInterface&$dataEntity, array $data) : void |
||
61 | |||
62 | /** |
||
63 | * Get data from an entity. |
||
64 | * |
||
65 | * @param EntityInterface $dataEntity |
||
66 | * @return array |
||
67 | */ |
||
68 | protected function getEntityData(EntityInterface $dataEntity) : array |
||
84 | |||
85 | /** |
||
86 | * Gets the filesystem category entity by the identifier. |
||
87 | * |
||
88 | * @param int $identifier |
||
89 | * @return null|FilesystemCategoryEntity |
||
90 | */ |
||
91 | public function getFilesystemCategoryById(int $identifier) : ? FilesystemCategoryEntity |
||
98 | |||
99 | /** |
||
100 | * Gets the filesystem category entity by the application identifier and name. |
||
101 | * |
||
102 | * @param int $applicationId |
||
103 | * @param string $name |
||
104 | * @return null|FilesystemCategoryEntity |
||
105 | */ |
||
106 | public function getFilesystemCategoryByApplicationAndName( |
||
120 | |||
121 | /** |
||
122 | * Gets the filesystem category entity list by the application identifier. |
||
123 | * |
||
124 | * @param int $applicationId |
||
125 | * @return FilesystemCategoryEntity[] |
||
126 | */ |
||
127 | public function getFilesystemCategoriesByApplication(int $applicationId) : ? array |
||
131 | } |
||
132 |