public function ParagraphsBehaviorCollection::getEnabled

Retrieves all enabled behavior plugins.

File

paragraphs/src/ParagraphsBehaviorCollection.php, line 31

Class

ParagraphsBehaviorCollection
A collection of paragraphs behavior plugins.

Namespace

Drupal\paragraphs

Code

public function getEnabled() {
  $this
    ->getAll();
  $enabled = [];
  foreach ($this
    ->getConfiguration() as $key => $value) {
    if (isset($value['enabled']) && $value['enabled'] == TRUE) {
      $enabled[$key] = $this
        ->get($key);
    }
  }
  return $enabled;
}