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