Backup of db before drupal security update
[yaffs-website] / web / core / modules / content_translation / src / ContentTranslationMetadataWrapperInterface.php
1 <?php
2
3 namespace Drupal\content_translation;
4
5 use Drupal\user\UserInterface;
6
7 /**
8  * Common interface for content translation metadata wrappers.
9  *
10  * This acts as a wrapper for an entity translation object, encapsulating the
11  * logic needed to retrieve translation metadata.
12  */
13 interface ContentTranslationMetadataWrapperInterface {
14
15   /**
16    * Retrieves the source language for this translation.
17    *
18    * @return string
19    *   The source language code.
20    */
21   public function getSource();
22
23   /**
24    * Sets the source language for this translation.
25    *
26    * @param string $source
27    *   The source language code.
28    *
29    * @return $this
30    */
31   public function setSource($source);
32
33   /**
34    * Returns the translation outdated status.
35    *
36    * @return bool
37    *   TRUE if the translation is outdated, FALSE otherwise.
38    */
39   public function isOutdated();
40
41   /**
42    * Sets the translation outdated status.
43    *
44    * @param bool $outdated
45    *   TRUE if the translation is outdated, FALSE otherwise.
46    *
47    * @return $this
48    */
49   public function setOutdated($outdated);
50
51   /**
52    * Returns the translation author.
53    *
54    * @return \Drupal\user\UserInterface
55    *   The user entity for the translation author.
56    */
57   public function getAuthor();
58
59   /**
60    * Sets the translation author.
61    *
62    * The metadata field will be updated, only if it's translatable.
63    *
64    * @param \Drupal\user\UserInterface $account
65    *   The translation author user entity.
66    *
67    * @return $this
68    */
69   public function setAuthor(UserInterface $account);
70
71   /**
72    * Returns the translation published status.
73    *
74    * @return bool
75    *   TRUE if the translation is published, FALSE otherwise.
76    */
77   public function isPublished();
78
79   /**
80    * Sets the translation published status.
81    *
82    * The metadata field will be updated, only if it's translatable.
83    *
84    * @param bool $published
85    *   TRUE if the translation is published, FALSE otherwise.
86    *
87    * @return $this
88    */
89   public function setPublished($published);
90
91   /**
92    * Returns the translation creation timestamp.
93    *
94    * @return int
95    *   The UNIX timestamp of when the translation was created.
96    */
97   public function getCreatedTime();
98
99   /**
100    * Sets the translation creation timestamp.
101    *
102    * The metadata field will be updated, only if it's translatable.
103    *
104    * @param int $timestamp
105    *   The UNIX timestamp of when the translation was created.
106    *
107    * @return $this
108    */
109   public function setCreatedTime($timestamp);
110
111   /**
112    * Returns the timestamp of the last entity change from current translation.
113    *
114    * @return int
115    *   The timestamp of the last entity save operation.
116    */
117   public function getChangedTime();
118
119   /**
120    * Sets the translation modification timestamp.
121    *
122    * The metadata field will be updated, only if it's translatable.
123    *
124    * @param int $timestamp
125    *   The UNIX timestamp of when the translation was last modified.
126    *
127    * @return $this
128    */
129   public function setChangedTime($timestamp);
130
131 }