You are here

public function Template::getBody in Wysiwyg API template plugin 3.0.x

Same name and namespace in other branches
  1. 8.2 src/Entity/Template.php \Drupal\wysiwyg_template\Entity\Template::getBody()

Gets the template body.

Return value

string The template HTML body.

Overrides TemplateInterface::getBody

File

src/Entity/Template.php, line 111

Class

Template
Defines the Template entity.

Namespace

Drupal\wysiwyg_template\Entity

Code

public function getBody() : string {
  if ($body = $this
    ->get('body')) {
    return $body['value'];
  }
  return '';
}