comparison core/modules/media/src/MediaInterface.php @ 0:c75dbcec494b

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