Set an optional content repository to find content by ids
Parameters
ContentRepositoryInterface $contentRepository:
File
- drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/ContentAwareGenerator.php, line 34
Class
- ContentAwareGenerator
- A generator that tries to generate routes from object, route names or
content objects or names.
Namespace
Symfony\Cmf\Component\Routing
Code
public function setContentRepository(ContentRepositoryInterface $contentRepository) {
$this->contentRepository = $contentRepository;
}