You are here

public function FilterFormat::getFilterTypes in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/filter/src/Entity/FilterFormat.php \Drupal\filter\Entity\FilterFormat::getFilterTypes()

Retrieves all filter types that are used in the text format.

Return value

array All filter types used by filters of the text format.

Overrides FilterFormatInterface::getFilterTypes

File

core/modules/filter/src/Entity/FilterFormat.php, line 259
Contains \Drupal\filter\Entity\FilterFormat.

Class

FilterFormat
Represents a text format.

Namespace

Drupal\filter\Entity

Code

public function getFilterTypes() {
  $filter_types = array();
  $filters = $this
    ->filters();
  foreach ($filters as $filter) {
    if ($filter->status) {
      $filter_types[] = $filter
        ->getType();
    }
  }
  return array_unique($filter_types);
}