You are here

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

Gets the list of allowed types for the given entity type.

Parameters

string|null $entity_type:

Return value

string[]

Overrides TemplateInterface::getBundles

1 call to Template::getBundles()
Template::save in src/Entity/Template.php
Saves an entity permanently.

File

src/Entity/Template.php, line 145

Class

Template
Defines the Template entity.

Namespace

Drupal\wysiwyg_template\Entity

Code

public function getBundles($entity_type = NULL) : array {
  if ($entity_type === NULL) {
    return empty($this->entity_types) ? [] : array_keys($this->entity_types);
  }
  return $this->entity_types[$entity_type] ?? [];
}