protected function EntityBrowser::widgetSelectorPluginCollection in Entity Browser 8
Same name and namespace in other branches
- 8.2 src/Entity/EntityBrowser.php \Drupal\entity_browser\Entity\EntityBrowser::widgetSelectorPluginCollection()
Returns widget selector plugin collection.
Return value
\Drupal\Core\Plugin\DefaultSingleLazyPluginCollection The tag plugin collection.
1 call to EntityBrowser::widgetSelectorPluginCollection()
- EntityBrowser::getPluginCollections in src/
Entity/ EntityBrowser.php - Returns the plugin collections used by this entity.
File
- src/
Entity/ EntityBrowser.php, line 363
Class
- EntityBrowser
- Defines an entity browser configuration entity.
Namespace
Drupal\entity_browser\EntityCode
protected function widgetSelectorPluginCollection() {
if (!$this->widgetSelectorCollection) {
$options = [];
foreach ($this
->getWidgets()
->getInstanceIds() as $id) {
$options[$id] = $this
->getWidgets()
->get($id)
->label();
}
$this->widget_selector_configuration['widget_ids'] = $options;
$this->widgetSelectorCollection = new DefaultSingleLazyPluginCollection(\Drupal::service('plugin.manager.entity_browser.widget_selector'), $this->widget_selector, $this->widget_selector_configuration);
}
return $this->widgetSelectorCollection;
}