1 | <?php |
||
17 | class Gallery |
||
18 | { |
||
19 | /** @var integer materialFieldId Table materialField identifier */ |
||
20 | protected $materialFieldId = null; |
||
21 | |||
22 | /** @var QueryInterface Database query interface */ |
||
23 | protected $query; |
||
24 | |||
25 | /** |
||
26 | * Constructor Gallery. |
||
27 | * This constructor finds identifier additional field gallery from database record its material and field identifiers. |
||
28 | * |
||
29 | * @param QueryInterface $query Database query interface |
||
30 | * @param integer $materialId material identifier |
||
31 | * @param integer $fieldId field identifier |
||
32 | */ |
||
33 | public function __construct(QueryInterface $query, $materialId, $fieldId) |
||
52 | |||
53 | /** |
||
54 | * Check on empty gallery. |
||
55 | * |
||
56 | * @return boolean |
||
57 | **/ |
||
58 | public function hasImages() |
||
62 | |||
63 | /** |
||
64 | * Get collection of images for material by gallery additional field selector. If none is passed |
||
65 | * all images from gallery table would be returned empty array. |
||
66 | * |
||
67 | * @return array |
||
68 | */ |
||
69 | public function getImages() |
||
85 | } |