Editor::getFilterFormat

public Editor::getFilterFormat()

Returns the filter format this text editor is associated with.

This could be NULL if the associated filter format is still being created.

Return value

\Drupal\filter\FilterFormatInterface|null

Overrides EditorInterface::getFilterFormat

See also

hasAssociatedFilterFormat()

File

core/modules/editor/src/Entity/Editor.php, line 121

Class

Editor
Defines the configured text editor entity.

Namespace

Drupal\editor\Entity

Code

public function getFilterFormat() {
  if (!$this->filterFormat) {
    $this->filterFormat = \Drupal::entityManager()->getStorage('filter_format')->load($this->format);
  }
  return $this->filterFormat;
}
doc_Drupal
2016-10-29 09:03:42
Comments
Leave a Comment

Please login to continue.