@@ -57,7 +57,7 @@ |
||
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
60 | - * @param [type] $resourceName [description] |
|
60 | + * @param string $resourceName [description] |
|
61 | 61 | * |
62 | 62 | * @return [type] [description] |
63 | 63 | */ |
@@ -28,7 +28,6 @@ discard block |
||
28 | 28 | /** |
29 | 29 | * Get single settings for menu content provider. |
30 | 30 | * |
31 | - * @param int $id Id of the desired settings. |
|
32 | 31 | * |
33 | 32 | * @ApiDoc( |
34 | 33 | * description="Return single settings.", |
@@ -156,7 +155,7 @@ discard block |
||
156 | 155 | /** |
157 | 156 | * Return form if is not valid, otherwise process form and return Page object. |
158 | 157 | * |
159 | - * @param Page $settings |
|
158 | + * @param MenuContentProviderSettings $settings |
|
160 | 159 | * @param string $method Method of request |
161 | 160 | * |
162 | 161 | * @return Symfony\Component\Form\Form [description] |
@@ -56,7 +56,7 @@ |
||
56 | 56 | { |
57 | 57 | // TODO add caching, invalidate after change of settings table ? |
58 | 58 | $settings = null; |
59 | - while(is_null($settings) && $page) { |
|
59 | + while (is_null($settings) && $page) { |
|
60 | 60 | $settings = $this->em->getRepository('\Webcook\Cms\CoreBundle\Entity\MenuContentProviderSettings')->findOneBy(array( |
61 | 61 | 'page' => $page, |
62 | 62 | 'section' => $section |
@@ -35,7 +35,7 @@ |
||
35 | 35 | |
36 | 36 | public function setDirectChildren(Bool $directChildren) |
37 | 37 | { |
38 | - $this->directChildren=$directChildren; |
|
38 | + $this->directChildren = $directChildren; |
|
39 | 39 | |
40 | 40 | return $this; |
41 | 41 | } |
@@ -182,7 +182,7 @@ |
||
182 | 182 | |
183 | 183 | public function getPath() |
184 | 184 | { |
185 | - $path = (!$this->getLanguage()->isDefault() ? $this->getLanguage()->getLocale() : '') . $this->getSlug(); |
|
185 | + $path = (!$this->getLanguage()->isDefault() ? $this->getLanguage()->getLocale() : '').$this->getSlug(); |
|
186 | 186 | |
187 | 187 | return str_replace($this->getRoot()->getSlug(), '', $path); |
188 | 188 | } |
@@ -97,6 +97,9 @@ |
||
97 | 97 | $this->manager->flush(); |
98 | 98 | } |
99 | 99 | |
100 | + /** |
|
101 | + * @param Page $parent |
|
102 | + */ |
|
100 | 103 | private function addPage(String $title, Language $language, $parent = null) |
101 | 104 | { |
102 | 105 | $page = new Page(); |
@@ -12,7 +12,6 @@ |
||
12 | 12 | use Doctrine\Common\Persistence\ObjectManager; |
13 | 13 | use Doctrine\Common\DataFixtures\OrderedFixtureInterface; |
14 | 14 | use Webcook\Cms\CoreBundle\Entity\Page; |
15 | -use Webcook\Cms\CoreBundle\Entity\PageSection; |
|
16 | 15 | use Webcook\Cms\I18nBundle\Entity\Language; |
17 | 16 | use Webcook\Cms\CoreBundle\Entity\Section; |
18 | 17 | use Webcook\Cms\CoreBundle\Entity\ContentProvider; |
@@ -23,7 +23,7 @@ |
||
23 | 23 | foreach ($pageSections as $pageSection) { |
24 | 24 | $section = $pageSection->getSection(); |
25 | 25 | |
26 | - $contentProvider = $this->get($pageSection->getContentProvider()->getName()); |
|
26 | + $contentProvider = $this->get($pageSection->getContentProvider()->getName()); |
|
27 | 27 | $order = $pageSection->getOrder(); |
28 | 28 | |
29 | 29 | if (!array_key_exists($section->getName(), $sections)) { |