1 | <?php |
||
16 | class ContentItem extends FrontMatterDocument implements \JsonSerializable, RepeatableItem |
||
17 | { |
||
18 | /** |
||
19 | * The collection this Content Item belongs to. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | private $parentCollection; |
||
24 | |||
25 | /** |
||
26 | * The Page View that will be used to render this Content Item. |
||
27 | * |
||
28 | * @var PageView |
||
29 | */ |
||
30 | private $parentPageView; |
||
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | 27 | public function createJail() |
|
41 | |||
42 | 21 | public function getNamespace() |
|
46 | |||
47 | 37 | public function setNamespace($collection) |
|
51 | |||
52 | 3 | public function handleSpecialRedirects() |
|
68 | |||
69 | /** |
||
70 | * Return the body of the Content Item parsed as markdown. |
||
71 | * |
||
72 | * @return string |
||
73 | */ |
||
74 | 7 | public function getContent() |
|
86 | |||
87 | /** |
||
88 | * Parse the Twig that is embedded inside a ContentItem's body. |
||
89 | */ |
||
90 | 7 | private function parseTwig() |
|
100 | |||
101 | /** |
||
102 | * Parse the ContentItem's body based on the extension of the file. |
||
103 | */ |
||
104 | 7 | private function parseEngines() |
|
125 | |||
126 | /** |
||
127 | * @return PageView |
||
128 | */ |
||
129 | public function &getPageView() |
||
133 | |||
134 | public function getJailedPageView() |
||
138 | |||
139 | /** |
||
140 | * Set the parent Page View that this Content Item will have be assigned to. |
||
141 | * |
||
142 | * @param PageView $pageView |
||
143 | */ |
||
144 | 5 | public function setParentPageView(PageView &$pageView) |
|
148 | |||
149 | /** |
||
150 | * {@inheritdoc} |
||
151 | */ |
||
152 | public function jsonSerialize() |
||
160 | } |
||
161 |
Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.