You are here

public function FieldBlockController::getEnabledEntityTypes in Field as Block 8.2

Get currently enabled types either from config or module defaults.

Return value

array Entity type ids.

1 call to FieldBlockController::getEnabledEntityTypes()
FieldBlockController::isBlockableEntityType in src/Controller/FieldBlockController.php
Determine if Entity Type should have field block created.

File

src/Controller/FieldBlockController.php, line 22

Class

FieldBlockController
Class FieldBlockController.

Namespace

Drupal\fieldblock\Controller

Code

public function getEnabledEntityTypes() {
  $entity_types = $this
    ->config('fieldblock.settings')
    ->get('enabled_entity_types');
  if (!$entity_types) {
    return $this
      ->getDefaultEntityTypes();
  }
  return array_filter($entity_types);
}