vendor/se7enxweb/admin-ui/src/lib/Form/Type/Content/VersionInfoType.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\VersionInfoTransformer;
  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 VersionInfoType 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
  27. ->add(
  28. 'content_info',
  29. ContentInfoType::class,
  30. ['label' => false]
  31. )
  32. ->add(
  33. 'version_no',
  34. HiddenType::class,
  35. ['label' => false]
  36. )
  37. ->addViewTransformer(new VersionInfoTransformer($this->contentService));
  38. }
  39. }
  40. class_alias(VersionInfoType::class, 'EzSystems\EzPlatformAdminUi\Form\Type\Content\VersionInfoType');