Skip to content

Instantly share code, notes, and snippets.

@wouterj
Created February 24, 2014 12:54
Show Gist options
  • Select an option

  • Save wouterj/9187869 to your computer and use it in GitHub Desktop.

Select an option

Save wouterj/9187869 to your computer and use it in GitHub Desktop.
<?php
namespace Wj\ForumBundle\Document;
use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCR;
use Symfony\Cmf\Component\Routing\RouteReferrersReadInterface;
/**
* @PHPCR\Document(referenceable=true)
*/
class Topic implements RouteReferrersReadInterface
{
// ...
/**
* @PHPCR\Referrers(
* referringDocument="Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route",
* referencedBy="content"
* )
*/
protected $routes;
// ...
public function getRoutes()
{
return $this->routes;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment