
Untitled
By: a guest on
Jun 6th, 2012 | syntax:
PHP | size: 0.91 KB | hits: 8 | expires: Never
<?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];
}
}
?>