public function ParagraphsBehaviorCollection::getEnabled in Paragraphs 8
Retrieves all enabled behavior plugins.
File
- src/
ParagraphsBehaviorCollection.php, line 31
Class
- ParagraphsBehaviorCollection
- A collection of paragraphs behavior plugins.
Namespace
Drupal\paragraphsCode
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;
}