From ce78ede3fe6502bbdf4652004685dd7894ffc3ce Mon Sep 17 00:00:00 2001 From: mkoosej Date: Tue, 22 Jul 2014 13:47:53 -0400 Subject: [PATCH 1/3] Add MenuOptionsInterface For compatibility with MenuNodeHtmlAttributeExtension from the menuBundle --- Doctrine/Phpcr/Page.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Doctrine/Phpcr/Page.php b/Doctrine/Phpcr/Page.php index b8e4445..d20937a 100644 --- a/Doctrine/Phpcr/Page.php +++ b/Doctrine/Phpcr/Page.php @@ -18,9 +18,9 @@ use Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishTimePeriodInterface; use Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishableInterface; use Symfony\Cmf\Bundle\CoreBundle\Translatable\TranslatableInterface; +use Symfony\Cmf\Bundle\MenuBundle\Model\MenuOptionsInterface; use Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route; use Symfony\Cmf\Component\Routing\RouteReferrersReadInterface; -use PHPCR\NodeInterface as PHPCRNodeInterface; use Symfony\Component\Validator\Constraints as Assert; @@ -40,6 +40,7 @@ class Page extends Route implements RouteReferrersReadInterface, // this must not be the write interface, it would make no sense PublishTimePeriodInterface, PublishableInterface, + MenuOptionsInterface, TranslatableInterface { /** @@ -670,16 +671,4 @@ public function setRouteOptions(array $options) { parent::setOptions($options); } - - /** - * Retrieve UUID of Node or null if not present - * - * @return string|null - */ - public function getUUID() - { - $node = $this->getNode(); - - return $node instanceof PHPCRNodeInterface ? $node->getIdentifier() : null; - } } From 70db233b3b924d979d707ba04a939cde4c0bd6a5 Mon Sep 17 00:00:00 2001 From: mkoosej Date: Tue, 22 Jul 2014 13:51:40 -0400 Subject: [PATCH 2/3] Add MenuOptionsInterface --- Doctrine/Phpcr/Page.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Doctrine/Phpcr/Page.php b/Doctrine/Phpcr/Page.php index d20937a..306ded3 100644 --- a/Doctrine/Phpcr/Page.php +++ b/Doctrine/Phpcr/Page.php @@ -21,6 +21,7 @@ use Symfony\Cmf\Bundle\MenuBundle\Model\MenuOptionsInterface; use Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route; use Symfony\Cmf\Component\Routing\RouteReferrersReadInterface; +use PHPCR\NodeInterface as PHPCRNodeInterface; use Symfony\Component\Validator\Constraints as Assert; @@ -671,4 +672,16 @@ public function setRouteOptions(array $options) { parent::setOptions($options); } + + /** + * Retrieve UUID of Node or null if not present + * + * @return string|null + */ + public function getUUID() + { + $node = $this->getNode(); + + return $node instanceof PHPCRNodeInterface ? $node->getIdentifier() : null; + } } From 7a2cf0369412383bd21c9194d85c636917c75d2e Mon Sep 17 00:00:00 2001 From: mkoosej Date: Tue, 12 Aug 2014 11:29:18 -0400 Subject: [PATCH 3/3] update menu-bundle version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ec7b5cd..74dc782 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "symfony/framework-bundle": "~2.3", "symfony-cmf/core-bundle": ">=1.1.0,<1.3-dev", "symfony-cmf/routing-bundle": ">=1.2.0,<1.4-dev", - "symfony-cmf/menu-bundle": ">=1.0.0,<1.3-dev", + "symfony-cmf/menu-bundle": ">=1.2.0,<1.3-dev", "symfony-cmf/content-bundle": ">=1.0.0,<1.3-dev", "doctrine/phpcr-bundle": ">=1.1.0,<1.3-dev", "doctrine/phpcr-odm": ">=1.1.0,<1.3-dev"