1 | <?php |
||
9 | class ContentItem extends FrontMatterObject implements \JsonSerializable |
||
10 | { |
||
11 | /** |
||
12 | * The collection this Content Item belongs to |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | private $parentCollection; |
||
17 | |||
18 | /** |
||
19 | * The Page View that will be used to render this Content Item |
||
20 | * |
||
21 | * @var PageView |
||
22 | */ |
||
23 | private $parentPageView; |
||
24 | |||
25 | /** |
||
26 | * {@inheritdoc} |
||
27 | */ |
||
28 | 27 | public function createJail () |
|
29 | { |
||
30 | 27 | return (new JailObject($this, array_merge(self::$whiteListFunctions, array( |
|
31 | 'getCollection' |
||
32 | 27 | )), array('getPageView' => 'getJailedPageView'))); |
|
33 | } |
||
34 | |||
35 | 1 | public function getCollection () |
|
39 | |||
40 | 28 | public function setCollection ($collection) |
|
44 | |||
45 | /** |
||
46 | * Return the body of the Content Item parsed as markdown |
||
47 | * |
||
48 | * @return string |
||
49 | */ |
||
50 | 4 | public function getContent () |
|
89 | |||
90 | /** |
||
91 | * @return PageView |
||
92 | */ |
||
93 | public function &getPageView () |
||
97 | |||
98 | public function getJailedPageView () |
||
102 | |||
103 | /** |
||
104 | * Set the parent Page View that this Content Item will have be assigned to |
||
105 | * |
||
106 | * @param PageView $pageView |
||
107 | */ |
||
108 | public function setPageView (&$pageView) |
||
112 | |||
113 | /** |
||
114 | * {@inheritdoc} |
||
115 | */ |
||
116 | public function jsonSerialize() |
||
122 | } |