1 | <?php |
||
28 | class ImageThumbnail extends PluginBase implements FieldWidgetDisplayInterface, ContainerFactoryPluginInterface { |
||
29 | |||
30 | /** |
||
31 | * Entity manager service. |
||
32 | * |
||
33 | * @var \Drupal\Core\Entity\EntityManagerInterface |
||
34 | */ |
||
35 | protected $entityManager; |
||
36 | |||
37 | /** |
||
38 | * Constructs widget plugin. |
||
39 | * |
||
40 | * @param array $configuration |
||
41 | * A configuration array containing information about the plugin instance. |
||
42 | * @param string $plugin_id |
||
43 | * The plugin_id for the plugin instance. |
||
44 | * @param mixed $plugin_definition |
||
45 | * The plugin implementation definition. |
||
46 | * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager |
||
47 | * Entity manager service. |
||
48 | */ |
||
49 | public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager) { |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public function view(EntityInterface $entity) { |
||
78 | |||
79 | /** |
||
80 | * {@inheritdoc} |
||
81 | */ |
||
82 | public function settingsForm(array $form, FormStateInterface $form_state) { |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | public function isApplicable(EntityTypeInterface $entity_type) { |
||
105 | |||
106 | } |
||
107 |