lib/boab/cms-bundle/src/Entity/TermRoute.php line 13

Open in your IDE?
  1. <?php
  2. namespace Boab\CmsBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * TaxonomyRoute
  6.  *
  7.  * @ORM\Table(name="route_term")
  8.  * @ORM\Entity(repositoryClass="Boab\CmsBundle\Repository\RouteRepository")
  9.  */
  10. class TermRoute extends PostRoute
  11. {
  12.     const DEFAULT_CONTROLLER 'content_controller::categoryAction';
  13.     public function setPath(string $path): static
  14.     {
  15.         return parent::setPath($path);
  16.     }
  17.     public function getController()
  18.     {
  19.         return self::DEFAULT_CONTROLLER;
  20.     }
  21.     public function setDefaults( array $defauts=[]): static
  22.     {
  23.         $defauts = [
  24.             '_controller' => self::DEFAULT_CONTROLLER,
  25.             '_title' => $this->getTitle(),
  26.         ];
  27.         return $this->addDefaults($defauts);
  28.     }
  29. }