883cc9e6e26553a01b5b6d988c8ad38fdd0e601d
[yaffs-website] / web / core / modules / field_layout / src / Form / FieldLayoutEntityFormDisplayEditForm.php
1 <?php
2
3 namespace Drupal\field_layout\Form;
4
5 use Drupal\Component\Plugin\PluginManagerBase;
6 use Drupal\Core\Field\FieldTypePluginManagerInterface;
7 use Drupal\Core\Layout\LayoutPluginManagerInterface;
8 use Drupal\field_ui\Form\EntityFormDisplayEditForm;
9 use Symfony\Component\DependencyInjection\ContainerInterface;
10
11 /**
12  * Edit form for the EntityFormDisplay entity type.
13  *
14  * @internal
15  */
16 class FieldLayoutEntityFormDisplayEditForm extends EntityFormDisplayEditForm {
17
18   use FieldLayoutEntityDisplayFormTrait;
19
20   /**
21    * FieldLayoutEntityFormDisplayEditForm constructor.
22    *
23    * @param \Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager
24    *   The field type manager.
25    * @param \Drupal\Component\Plugin\PluginManagerBase $plugin_manager
26    *   The widget plugin manager.
27    * @param \Drupal\Core\Layout\LayoutPluginManagerInterface $layout_plugin_manager
28    *   The layout plugin manager.
29    */
30   public function __construct(FieldTypePluginManagerInterface $field_type_manager, PluginManagerBase $plugin_manager, LayoutPluginManagerInterface $layout_plugin_manager) {
31     parent::__construct($field_type_manager, $plugin_manager);
32     $this->layoutPluginManager = $layout_plugin_manager;
33   }
34
35   /**
36    * {@inheritdoc}
37    */
38   public static function create(ContainerInterface $container) {
39     return new static(
40       $container->get('plugin.manager.field.field_type'),
41       $container->get('plugin.manager.field.widget'),
42       $container->get('plugin.manager.core.layout')
43     );
44   }
45
46 }