interface MediaInterface
Same name and namespace in other branches
- 11.x core/modules/media/src/MediaInterface.php \Drupal\media\MediaInterface
- 9 core/modules/media/src/MediaInterface.php \Drupal\media\MediaInterface
- 10 core/modules/media/src/MediaInterface.php \Drupal\media\MediaInterface
Provides an interface defining an entity for media items.
Hierarchy
- interface \Drupal\Core\Entity\ContentEntityInterface extends \Drupal\Core\Entity\Traversable, \Drupal\Core\Entity\FieldableEntityInterface, \Drupal\Core\Entity\TranslatableRevisionableInterface, \Drupal\Core\Entity\SynchronizableInterface; interface \Drupal\Core\Entity\EntityChangedInterface extends \Drupal\Core\Entity\EntityInterface; interface \Drupal\Core\Entity\EntityPublishedInterface extends \Drupal\Core\Entity\EntityInterface; interface \Drupal\Core\Entity\RevisionLogInterface extends \Drupal\Core\Entity\RevisionableInterface; interface \Drupal\user\EntityOwnerInterface
Expanded class hierarchy of MediaInterface
All classes that implement MediaInterface
15 files declare their use of MediaInterface
- AddFormBase.php in core/
modules/ media_library/ src/ Form/ AddFormBase.php - EditorMediaDialog.php in core/
modules/ media/ src/ Form/ EditorMediaDialog.php - EntityAccessChecker.php in core/
modules/ jsonapi/ src/ Access/ EntityAccessChecker.php - File.php in core/
modules/ media/ src/ Plugin/ media/ Source/ File.php - FileUploadForm.php in core/
modules/ media_library/ src/ Form/ FileUploadForm.php
File
-
core/
modules/ media/ src/ MediaInterface.php, line 14
Namespace
Drupal\mediaView source
interface MediaInterface extends ContentEntityInterface, EntityChangedInterface, RevisionLogInterface, EntityOwnerInterface, EntityPublishedInterface {
/**
* Gets the media item name.
*
* @return string
* The name of the media item.
*/
public function getName();
/**
* Sets the media item name.
*
* @param string $name
* The name of the media item.
*
* @return $this
*/
public function setName($name);
/**
* Returns the media item creation timestamp.
*
* @todo Remove and use the new interface when #2833378 is done.
* @see https://www.drupal.org/node/2833378
*
* @return int
* Creation timestamp of the media item.
*/
public function getCreatedTime();
/**
* Sets the media item creation timestamp.
*
* @todo Remove and use the new interface when #2833378 is done.
* @see https://www.drupal.org/node/2833378
*
* @param int $timestamp
* The media creation timestamp.
*
* @return $this
* The called media item.
*/
public function setCreatedTime($timestamp);
/**
* Returns the media source.
*
* @return \Drupal\media\MediaSourceInterface
* The media source.
*/
public function getSource();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.