X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fmedia_entity%2Fsrc%2FForm%2FMediaBundleDeleteConfirm.php;fp=web%2Fmodules%2Fcontrib%2Fmedia_entity%2Fsrc%2FForm%2FMediaBundleDeleteConfirm.php;h=0000000000000000000000000000000000000000;hp=f860eb4e175428fcef57a3ed31a1010614b57c5c;hb=9e65bae52407293a5182f19dc57b5628b09e92f4;hpb=af6d1fb995500ae68849458ee10d66abbdcfb252 diff --git a/web/modules/contrib/media_entity/src/Form/MediaBundleDeleteConfirm.php b/web/modules/contrib/media_entity/src/Form/MediaBundleDeleteConfirm.php deleted file mode 100644 index f860eb4e1..000000000 --- a/web/modules/contrib/media_entity/src/Form/MediaBundleDeleteConfirm.php +++ /dev/null @@ -1,59 +0,0 @@ -queryFactory = $query_factory; - } - - /** - * {@inheritdoc} - */ - public static function create(ContainerInterface $container) { - return new static( - $container->get('entity.query') - ); - } - - /** - * {@inheritdoc} - */ - public function buildForm(array $form, FormStateInterface $form_state) { - $num_entities = $this->queryFactory->get('media') - ->condition('bundle', $this->entity->id()) - ->count() - ->execute(); - if ($num_entities) { - $caption = '

' . $this->formatPlural($num_entities, '%type is used by 1 piece of content on your site. You can not remove this content type until you have removed all of the %type content.', '%type is used by @count pieces of content on your site. You may not remove %type until you have removed all of the %type content.', ['%type' => $this->entity->label()]) . '

'; - $form['#title'] = $this->getQuestion(); - $form['description'] = ['#markup' => $caption]; - return $form; - } - - return parent::buildForm($form, $form_state); - } - -}