annotate core/modules/media/src/MediaInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 namespace Drupal\media;
Chris@0 4
Chris@0 5 use Drupal\Core\Entity\EntityChangedInterface;
Chris@0 6 use Drupal\Core\Entity\ContentEntityInterface;
Chris@0 7 use Drupal\Core\Entity\EntityPublishedInterface;
Chris@0 8 use Drupal\Core\Entity\RevisionLogInterface;
Chris@0 9 use Drupal\user\EntityOwnerInterface;
Chris@0 10
Chris@0 11 /**
Chris@0 12 * Provides an interface defining an entity for media items.
Chris@0 13 */
Chris@0 14 interface MediaInterface extends ContentEntityInterface, EntityChangedInterface, RevisionLogInterface, EntityOwnerInterface, EntityPublishedInterface {
Chris@0 15
Chris@0 16 /**
Chris@0 17 * Gets the media item name.
Chris@0 18 *
Chris@0 19 * @return string
Chris@0 20 * The name of the media item.
Chris@0 21 */
Chris@0 22 public function getName();
Chris@0 23
Chris@0 24 /**
Chris@0 25 * Sets the media item name.
Chris@0 26 *
Chris@0 27 * @param string $name
Chris@0 28 * The name of the media item.
Chris@0 29 *
Chris@0 30 * @return $this
Chris@0 31 */
Chris@0 32 public function setName($name);
Chris@0 33
Chris@0 34 /**
Chris@0 35 * Returns the media item creation timestamp.
Chris@0 36 *
Chris@0 37 * @todo Remove and use the new interface when #2833378 is done.
Chris@0 38 * @see https://www.drupal.org/node/2833378
Chris@0 39 *
Chris@0 40 * @return int
Chris@0 41 * Creation timestamp of the media item.
Chris@0 42 */
Chris@0 43 public function getCreatedTime();
Chris@0 44
Chris@0 45 /**
Chris@0 46 * Sets the media item creation timestamp.
Chris@0 47 *
Chris@0 48 * @todo Remove and use the new interface when #2833378 is done.
Chris@0 49 * @see https://www.drupal.org/node/2833378
Chris@0 50 *
Chris@0 51 * @param int $timestamp
Chris@0 52 * The media creation timestamp.
Chris@0 53 *
Chris@0 54 * @return \Drupal\media\MediaInterface
Chris@0 55 * The called media item.
Chris@0 56 */
Chris@0 57 public function setCreatedTime($timestamp);
Chris@0 58
Chris@0 59 /**
Chris@0 60 * Returns the media source.
Chris@0 61 *
Chris@0 62 * @return \Drupal\media\MediaSourceInterface
Chris@0 63 * The media source.
Chris@0 64 */
Chris@0 65 public function getSource();
Chris@0 66
Chris@0 67 }