@@ -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 | } |
@@ -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)) { |
@@ -57,7 +57,7 @@ discard block |
||
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 | */ |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | /** |
95 | 95 | * @param string $key [description] |
96 | 96 | * |
97 | - * @return [type] [description] |
|
97 | + * @return null|integer [description] |
|
98 | 98 | */ |
99 | 99 | protected function getLockVersion($key) |
100 | 100 | { |
@@ -12,14 +12,11 @@ |
||
12 | 12 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
13 | 13 | use Webcook\Cms\CoreBundle\Entity\Page; |
14 | 14 | use Webcook\Cms\CoreBundle\Entity\PageSection; |
15 | -use Webcook\Cms\CoreBundle\Form\Type\PageType; |
|
16 | 15 | use Webcook\Cms\CoreBundle\Form\Type\PageSectionType; |
17 | 16 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
18 | 17 | use Webcook\Cms\SecurityBundle\Authorization\Voter\WebcookCmsVoter; |
19 | 18 | use FOS\RestBundle\Controller\Annotations\Get; |
20 | -use FOS\RestBundle\Controller\Annotations\Post; |
|
21 | 19 | use FOS\RestBundle\Controller\Annotations\Put; |
22 | -use FOS\RestBundle\Controller\Annotations\Delete; |
|
23 | 20 | use Doctrine\DBAL\LockMode; |
24 | 21 | |
25 | 22 | /** |