src/Entity/NewsTag.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Kunstmaan\ArticleBundle\Entity\AbstractTag;
  6. use Symfony\Component\Form\AbstractType;
  7. use App\Form\NewsTagAdminType;
  8. use Kunstmaan\NodeSearchBundle\Helper\SearchTypeInterface;
  9. #[ORM\Entity]
  10. #[ORM\Table(name'app_itempage_tags')]
  11. #[ORM\UniqueConstraint(name'itempage_tag_name_idx'columns: ['name'])]
  12. #[Gedmo\SoftDeleteable(fieldName'deletedAt')]
  13. class NewsTag extends AbstractTag implements SearchTypeInterface
  14. {
  15.     /**
  16.      * Returns the default backend form type for this page
  17.      *
  18.      * @return string
  19.      */
  20.     public function getAdminType()
  21.     {
  22.         return NewsTagAdminType::class;
  23.     }
  24.     /**
  25.      * {@inheritdoc}
  26.      */
  27.     public function getSearchType()
  28.     {
  29.         return 'Categories';
  30.     }
  31. }