X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fmodules%2Fcontrib%2Fmedia_entity%2Fsrc%2FForm%2FMediaInlineForm.php;fp=web%2Fmodules%2Fcontrib%2Fmedia_entity%2Fsrc%2FForm%2FMediaInlineForm.php;h=0000000000000000000000000000000000000000;hb=9e65bae52407293a5182f19dc57b5628b09e92f4;hp=020414f43fe59e7bb0c44fde5df9bc396ff7adfe;hpb=af6d1fb995500ae68849458ee10d66abbdcfb252;p=yaffs-website diff --git a/web/modules/contrib/media_entity/src/Form/MediaInlineForm.php b/web/modules/contrib/media_entity/src/Form/MediaInlineForm.php deleted file mode 100644 index 020414f43..000000000 --- a/web/modules/contrib/media_entity/src/Form/MediaInlineForm.php +++ /dev/null @@ -1,56 +0,0 @@ - 'field', - 'label' => $this->t('Thumbnail'), - 'weight' => 1, - 'display_options' => [ - 'type' => 'image', - 'settings' => [ - 'image_style' => 'thumbnail', - ], - ], - ]; - - return $fields; - } - - /** - * {@inheritdoc} - */ - public function entityFormSubmit(array &$entity_form, FormStateInterface $form_state) { - parent::entityFormSubmit($entity_form, $form_state); - - /** @var \Drupal\media_entity\MediaInterface $entity */ - $entity = $entity_form['#entity']; - - // Make sure media thumbnail is set correctly. - $entity->automaticallySetThumbnail(); - - if ($entity_form['#save_entity']) { - $entity->save(); - } - } - -}