public TextProcessed::getValue()
Gets the data value.
Return value
mixed
Overrides TypedData::getValue
File
- core/modules/text/src/TextProcessed.php, line 38
Class
- TextProcessed
- A computed property for processing text with a format.
Namespace
Drupal\text
Code
public function getValue() { if ($this->processed !== NULL) { return $this->processed; } $item = $this->getParent(); $text = $item->{($this->definition->getSetting('text source'))}; // Avoid running check_markup() on empty strings. if (!isset($text) || $text === '') { $this->processed = ''; } else { $this->processed = check_markup($text, $item->format, $item->getLangcode()); } return $this->processed; }
Please login to continue.