Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Coddict\WebsiteBundle\Document;
- use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCRODM;
- use Symfony\Component\Validator\Constraints as Assert;
- use Doctrine\Common\Collections\ArrayCollection;
- /** @PHPCRODM\Document(referenceable=true) */
- class Page
- {
- /** @PHPCRODM\Id */
- public $path;
- /** @PHPCRODM\String */
- public $name;
- /** @PHPCRODM\String */
- public $content;
- /** @PHPCRODM\ParentDocument */
- public $category;
- /** @PHPCRODM\Referrers(filter="routeContent") **/
- public $routes;
- /**
- * @PHPCRODM\Boolean
- */
- public $deleted = false;
- /**
- * @PHPCRODM\Boolean
- */
- public $hidden = false;
- public function getRelativePath()
- {
- $tmp = explode("/cms/content",$this->path);
- return $tmp[1];
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement