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