Updating Media dependent modules to versions compatible with core Media.
[yaffs-website] / web / modules / contrib / media_entity / src / MediaBundleListBuilder.php
diff --git a/web/modules/contrib/media_entity/src/MediaBundleListBuilder.php b/web/modules/contrib/media_entity/src/MediaBundleListBuilder.php
deleted file mode 100644 (file)
index e5158b1..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-
-namespace Drupal\media_entity;
-
-use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
-use Drupal\Core\Entity\EntityHandlerInterface;
-use Drupal\Core\Entity\EntityInterface;
-use Drupal\Component\Utility\Xss;
-use Drupal\Core\Url;
-
-/**
- * Provides a listing of media bundles.
- */
-class MediaBundleListBuilder extends ConfigEntityListBuilder implements EntityHandlerInterface {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function buildHeader() {
-    $header['title'] = $this->t('Name');
-    $header['description'] = [
-      'data' => $this->t('Description'),
-      'class' => [RESPONSIVE_PRIORITY_MEDIUM],
-    ];
-    return $header + parent::buildHeader();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function buildRow(EntityInterface $entity) {
-    $row['title'] = [
-      'data' => $entity->label(),
-      'class' => ['menu-label'],
-    ];
-    $row['description'] = Xss::filterAdmin($entity->getDescription());
-    return $row + parent::buildRow($entity);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function render() {
-    $build = parent::render();
-    $build['#empty'] = $this->t('No media bundle available. <a href="@link">Add media bundle</a>.', [
-      '@link' => Url::fromRoute('entity.media_bundle.add_form')->toString(),
-    ]);
-    return $build;
-  }
-
-}