3 namespace Drupal\media_entity;
5 use Drupal\Core\Config\Entity\ConfigEntityInterface;
6 use Drupal\entity\Entity\RevisionableEntityBundleInterface;
9 * Provides an interface defining a media bundle entity.
11 interface MediaBundleInterface extends ConfigEntityInterface, RevisionableEntityBundleInterface {
16 * @param \Drupal\media_entity\MediaInterface $media
20 * Returns the label of the bundle that entity belongs to.
22 public static function getLabel(MediaInterface $media);
25 * Checks if the bundle exists.
28 * The Media bundle ID.
31 * TRUE if the bundle with the given ID exists, FALSE otherwise.
33 public static function exists($id);
36 * Returns whether thumbnail downloads are queued.
39 * Returns download now or later.
41 public function getQueueThumbnailDownloads();
44 * Sets a flag to indicate that thumbnails should be downloaded via a queue.
46 * @param bool $queue_thumbnail_downloads
47 * The queue downloads flag.
49 public function setQueueThumbnailDownloads($queue_thumbnail_downloads);
52 * Returns the Media bundle description.
55 * Returns the Media bundle description.
57 public function getDescription();
60 * Returns the media type plugin.
62 * @return \Drupal\media_entity\MediaTypeInterface
65 public function getType();
68 * Returns the media type configuration.
71 * The type configuration.
73 public function getTypeConfiguration();
76 * Sets the media type configuration.
78 * @param array $configuration
79 * The type configuration.
81 public function setTypeConfiguration($configuration);
84 * Returns the media type status.
89 public function getStatus();
92 * Sets whether a new revision should be created by default.
94 * @param bool $new_revision
95 * TRUE if a new revision should be created by default.
97 public function setNewRevision($new_revision);