97e02f929fdf3a771a0e8799bbabce7342c0a94c
[yaffs-website] / web / modules / contrib / media_entity / src / MediaBundleInterface.php
1 <?php
2
3 namespace Drupal\media_entity;
4
5 use Drupal\Core\Config\Entity\ConfigEntityInterface;
6 use Drupal\entity\Entity\RevisionableEntityBundleInterface;
7
8 /**
9  * Provides an interface defining a media bundle entity.
10  */
11 interface MediaBundleInterface extends ConfigEntityInterface, RevisionableEntityBundleInterface {
12
13   /**
14    * Returns the label.
15    *
16    * @param \Drupal\media_entity\MediaInterface $media
17    *   The Media entity.
18    *
19    * @return string|bool
20    *   Returns the label of the bundle that entity belongs to.
21    */
22   public static function getLabel(MediaInterface $media);
23
24   /**
25    * Checks if the bundle exists.
26    *
27    * @param int $id
28    *   The Media bundle ID.
29    *
30    * @return bool
31    *   TRUE if the bundle with the given ID exists, FALSE otherwise.
32    */
33   public static function exists($id);
34
35   /**
36    * Returns whether thumbnail downloads are queued.
37    *
38    * @return bool
39    *   Returns download now or later.
40    */
41   public function getQueueThumbnailDownloads();
42
43   /**
44    * Sets a flag to indicate that thumbnails should be downloaded via a queue.
45    *
46    * @param bool $queue_thumbnail_downloads
47    *   The queue downloads flag.
48    */
49   public function setQueueThumbnailDownloads($queue_thumbnail_downloads);
50
51   /**
52    * Returns the Media bundle description.
53    *
54    * @return string
55    *   Returns the Media bundle description.
56    */
57   public function getDescription();
58
59   /**
60    * Returns the media type plugin.
61    *
62    * @return \Drupal\media_entity\MediaTypeInterface
63    *   The type.
64    */
65   public function getType();
66
67   /**
68    * Returns the media type configuration.
69    *
70    * @return array
71    *   The type configuration.
72    */
73   public function getTypeConfiguration();
74
75   /**
76    * Sets the media type configuration.
77    *
78    * @param array $configuration
79    *   The type configuration.
80    */
81   public function setTypeConfiguration($configuration);
82
83   /**
84    * Returns the media type status.
85    *
86    * @return bool
87    *   The status.
88    */
89   public function getStatus();
90
91   /**
92    * Sets whether a new revision should be created by default.
93    *
94    * @param bool $new_revision
95    *   TRUE if a new revision should be created by default.
96    */
97   public function setNewRevision($new_revision);
98
99 }