You are here

public function TokenCustom::getFormat in Custom Tokens 8

Get text format.

Return value

string Text format.

Overrides TokenCustomInterface::getFormat

File

src/Entity/TokenCustom.php, line 171

Class

TokenCustom
Defines the token_custom entity class.

Namespace

Drupal\token_custom\Entity

Code

public function getFormat() {
  $format = $this->content->format;
  if (!$format) {
    $format = filter_default_format();
  }
  return $format;
}