@@ -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)) { |
@@ -3,8 +3,6 @@ |
||
| 3 | 3 | namespace Webcook\Cms\CoreBundle\Base; |
| 4 | 4 | |
| 5 | 5 | use FOS\RestBundle\Controller\FOSRestController; |
| 6 | -use Symfony\Component\Security\Core\Exception\AccessDeniedException; |
|
| 7 | -use Webcook\Cms\SecurityBundle\Common\SecurityHelper; |
|
| 8 | 6 | |
| 9 | 7 | /** |
| 10 | 8 | * TODO documentation. |
@@ -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 integer|null [description] |
|
| 98 | 98 | */ |
| 99 | 99 | protected function getLockVersion($key) |
| 100 | 100 | { |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | |
| 83 | 83 | $crawler = $this->client->request( |
| 84 | 84 | $method, |
| 85 | - $url . ($addPostfix ? '.json' : ''), |
|
| 85 | + $url.($addPostfix ? '.json' : ''), |
|
| 86 | 86 | array(), |
| 87 | 87 | array(), |
| 88 | 88 | array( |
@@ -28,7 +28,6 @@ |
||
| 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 | public function getMenuSettingsAction($pageId = null, $sectionId = null) |
| 34 | 33 | { |
@@ -9,16 +9,8 @@ |
||
| 9 | 9 | namespace Webcook\Cms\CoreBundle\Controller; |
| 10 | 10 | |
| 11 | 11 | use Webcook\Cms\CoreBundle\Base\BaseRestController; |
| 12 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
| 13 | 12 | use Webcook\Cms\CoreBundle\Entity\MenuContentProviderSettings; |
| 14 | -use Webcook\Cms\CoreBundle\Form\Type\MenuContentProviderSettingsType; |
|
| 15 | -use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
|
| 16 | -use Webcook\Cms\SecurityBundle\Authorization\Voter\WebcookCmsVoter; |
|
| 17 | 13 | use FOS\RestBundle\Controller\Annotations\Get; |
| 18 | -use FOS\RestBundle\Controller\Annotations\Post; |
|
| 19 | -use FOS\RestBundle\Controller\Annotations\Put; |
|
| 20 | -use FOS\RestBundle\Controller\Annotations\Delete; |
|
| 21 | -use Doctrine\DBAL\LockMode; |
|
| 22 | 14 | |
| 23 | 15 | /** |
| 24 | 16 | * Page controller. |