X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fsystem%2Ftests%2Fmodules%2Fentity_test%2Fsrc%2FTypedData%2FComputedString.php;fp=web%2Fcore%2Fmodules%2Fsystem%2Ftests%2Fmodules%2Fentity_test%2Fsrc%2FTypedData%2FComputedString.php;h=a8175263b37307448ca9458886317b26b8225548;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/system/tests/modules/entity_test/src/TypedData/ComputedString.php b/web/core/modules/system/tests/modules/entity_test/src/TypedData/ComputedString.php new file mode 100644 index 000000000..a8175263b --- /dev/null +++ b/web/core/modules/system/tests/modules/entity_test/src/TypedData/ComputedString.php @@ -0,0 +1,53 @@ +getParent(); + $computed_value = "Computed! " . $item->get('value')->getString(); + + return $computed_value; + } + + /** + * {@inheritdoc} + */ + public function getCastedValue() { + return $this->getString(); + } + + /** + * {@inheritdoc} + */ + public function getCacheTags() { + return ['you_are_it', 'no_tag_backs']; + } + + /** + * {@inheritdoc} + */ + public function getCacheContexts() { + return ['request_format']; + } + + /** + * {@inheritdoc} + */ + public function getCacheMaxAge() { + return Cache::PERMANENT; + } + +}