public function Template::getFormat in Wysiwyg API template plugin 3.0.x
Same name and namespace in other branches
- 8.2 src/Entity/Template.php \Drupal\wysiwyg_template\Entity\Template::getFormat()
Gets the text format.
Return value
string The text format for the body.
Overrides TemplateInterface::getFormat
File
- src/
Entity/ Template.php, line 121
Class
- Template
- Defines the Template entity.
Namespace
Drupal\wysiwyg_template\EntityCode
public function getFormat() : string {
if ($body = $this
->get('body')) {
return $body['format'];
}
return '';
}