vendor/se7enxweb/admin-ui/src/lib/Form/Type/Content/ContentInfoType.php line 17

Open in your IDE?
  1. <?php
  2. /**
  3. * @copyright Copyright (C) Ibexa AS. All rights reserved.
  4. * @license For full copyright and license information view LICENSE file distributed with this source code.
  5. */
  6. declare(strict_types=1);
  7. namespace Ibexa\AdminUi\Form\Type\Content;
  8. use Ibexa\AdminUi\Form\DataTransformer\ContentInfoTransformer;
  9. use Ibexa\Contracts\Core\Repository\ContentService;
  10. use Symfony\Component\Form\AbstractType;
  11. use Symfony\Component\Form\Extension\Core\Type\HiddenType;
  12. use Symfony\Component\Form\FormBuilderInterface;
  13. class ContentInfoType extends AbstractType
  14. {
  15. /** @var \Ibexa\Contracts\Core\Repository\ContentService */
  16. protected $contentService;
  17. /**
  18. * @param \Ibexa\Contracts\Core\Repository\ContentService $contentService
  19. */
  20. public function __construct(ContentService $contentService)
  21. {
  22. $this->contentService = $contentService;
  23. }
  24. public function buildForm(FormBuilderInterface $builder, array $options)
  25. {
  26. $builder->addViewTransformer(new ContentInfoTransformer($this->contentService));
  27. }
  28. public function getParent(): ?string
  29. {
  30. return HiddenType::class;
  31. }
  32. }
  33. class_alias(ContentInfoType::class, 'EzSystems\EzPlatformAdminUi\Form\Type\Content\ContentInfoType');