comparison core/lib/Drupal/Core/Entity/TranslatableRevisionableInterface.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents
children
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
1 <?php
2
3 namespace Drupal\Core\Entity;
4
5 /**
6 * Provides methods for an entity to support revision translation.
7 */
8 interface TranslatableRevisionableInterface extends TranslatableInterface, RevisionableInterface {
9
10 /**
11 * Checks whether this is the latest revision affecting this translation.
12 *
13 * @return bool
14 * TRUE if this revision is the latest one affecting the active translation,
15 * FALSE otherwise.
16 */
17 public function isLatestTranslationAffectedRevision();
18
19 /**
20 * Marks the current revision translation as affected.
21 *
22 * Setting the revision translation affected flag through the setter or
23 * through the field directly will always enforce it, which will be used by
24 * the entity storage to determine if the flag should be recomputed or the set
25 * value should be used instead.
26 * @see \Drupal\Core\Entity\ContentEntityStorageBase::populateAffectedRevisionTranslations()
27 *
28 * @param bool|null $affected
29 * The flag value. A NULL value can be specified to reset the current value
30 * and make sure a new value will be computed by the system.
31 *
32 * @return $this
33 */
34 public function setRevisionTranslationAffected($affected);
35
36 /**
37 * Checks whether the current translation is affected by the current revision.
38 *
39 * @return bool
40 * TRUE if the entity object is affected by the current revision, FALSE
41 * otherwise.
42 */
43 public function isRevisionTranslationAffected();
44
45 /**
46 * Checks if the revision translation affected flag value has been enforced.
47 *
48 * @return bool
49 * TRUE if revision translation affected flag is enforced, FALSE otherwise.
50 *
51 * @internal
52 */
53 public function isRevisionTranslationAffectedEnforced();
54
55 /**
56 * Enforces the revision translation affected flag value.
57 *
58 * Note that this method call will not have any influence on the storage if
59 * the value of the revision translation affected flag is NULL which is used
60 * as an indication for the storage to recompute the flag.
61 * @see \Drupal\Core\Entity\ContentEntityInterface::setRevisionTranslationAffected()
62 *
63 * @param bool $enforced
64 * If TRUE, the value of the revision translation affected flag will be
65 * enforced so that on entity save the entity storage will not recompute it.
66 * Otherwise the storage will recompute it.
67 *
68 * @return $this
69 *
70 * @internal
71 */
72 public function setRevisionTranslationAffectedEnforced($enforced);
73
74 /**
75 * Checks if untranslatable fields should affect only the default translation.
76 *
77 * @return bool
78 * TRUE if untranslatable fields should affect only the default translation,
79 * FALSE otherwise.
80 */
81 public function isDefaultTranslationAffectedOnly();
82
83 }