1 | <?php |
||
22 | class ContentObject extends EzPlatformObject |
||
23 | { |
||
24 | /** |
||
25 | * @var ContentMapper |
||
26 | */ |
||
27 | private $mapper; |
||
28 | |||
29 | /** |
||
30 | * @return ContentMapper |
||
31 | 23 | */ |
|
32 | public function getMapper() |
||
40 | |||
41 | /** |
||
42 | * Allows direct control in ContentCreateStruct and ContentUpdateStruct. |
||
43 | * |
||
44 | * @param \Closure $callback |
||
45 | 2 | */ |
|
46 | 1 | public function setStructCallback(\Closure $callback) |
|
50 | |||
51 | /** |
||
52 | * Constructs content object. |
||
53 | * |
||
54 | * @param array|Content $data Field data |
||
55 | * @param array $properties Additional properties |
||
56 | 25 | */ |
|
57 | public function __construct($data, array $properties = array()) |
||
75 | |||
76 | /** |
||
77 | * Values in array must be of type Location, LocationObject or int. |
||
78 | * |
||
79 | * @param array $parentLocations |
||
80 | 6 | */ |
|
81 | public function setParentLocations(array $parentLocations) |
||
88 | |||
89 | /** |
||
90 | * Convert parameters to LocationCreateStruct and stores it on the ContentObject. |
||
91 | * |
||
92 | * @param Location|LocationObject|int $parentLocation |
||
93 | * |
||
94 | * @throws InvalidDataStructureException |
||
95 | 10 | */ |
|
96 | public function addParentLocation($parentLocation) |
||
112 | |||
113 | /** |
||
114 | * @param int|Location|LocationObject $parentLocation |
||
115 | * |
||
116 | * @return LocationObject |
||
117 | 10 | */ |
|
118 | private function convertToLocationObject($parentLocation) |
||
136 | } |
||
137 |