Retrieves all behavior plugins definitions and creates an instance for each one.
public function getAll() {
// Retrieve all available behavior plugin definitions.
if (!$this->definitions) {
$this->definitions = $this->manager
->getDefinitions();
}
// Ensure that there is an instance of all available behavior plugins.
// Note that getDefinitions() are keyed by $plugin_id. $instance_id is the
// $plugin_id for behavior plugins, since a single behavior plugin can only
// exist once in a paragraphs type.
foreach ($this->definitions as $plugin_id => $definition) {
if (!isset($this->pluginInstances[$plugin_id])) {
$this
->initializePlugin($plugin_id);
}
}
return $this->pluginInstances;
}