Retrieves filter definitions and creates an instance for each filter.
This is exclusively used for the text format administration page, on which all available filter plugins are exposed, regardless of whether the current text format has an active instance.
@todo Refactor text format administration to actually construct/create and destruct/remove actual filter plugin instances, using a library approach à la blocks.
public function getAll() {
// Retrieve all available filter plugin definitions.
if (!$this->definitions) {
$this->definitions = $this->manager
->getDefinitions();
}
// Ensure that there is an instance of all available filters.
// Note that getDefinitions() are keyed by $plugin_id. $instance_id is the
// $plugin_id for filters, since a single filter plugin can only exist once
// in a format.
foreach ($this->definitions as $plugin_id => $definition) {
$this
->initializePlugin($plugin_id);
}
return $this->pluginInstances;
}