public function FilefieldSourceManager::getDefinitions in FileField Sources 8
Gets the definition of all plugins for this type.
Return value
mixed[] An array of plugin definitions (empty array if no definitions were found). Keys are plugin IDs.
Overrides DefaultPluginManager::getDefinitions
See also
\Drupal\Core\Plugin\FilteredPluginManagerInterface::getFilteredDefinitions()
File
- src/
FilefieldSourceManager.php, line 38
Class
- FilefieldSourceManager
- Provides a plugin manager for file field source.
Namespace
Drupal\filefield_sourcesCode
public function getDefinitions() {
$definitions = parent::getDefinitions();
if (!\Drupal::moduleHandler()
->moduleExists('imce')) {
unset($definitions['imce']);
}
if (!filefield_sources_curl_enabled()) {
unset($definitions['remote']);
}
return $definitions;
}