1 entityreference.api.php hook_entityreference_selection_plugins()

Register a new selection plugin.

Return value

Array of plugins keyed by the plugin name, and the following as value::

  • title: The title of the plugin.
  • class: The class for the plugin.
  • weight: a value to rank which classes get called first.

File

core/modules/entityreference/entityreference.api.php, line 41
Describe hooks provided by the Entity Reference module.

Code

function hook_entityreference_selection_plugins() {
  $plugins['base'] = array(
    'title' => t('Simple (with optional filter by bundle)'),
    'class' => 'EntityReferenceSelectionHandlerGeneric',
    'weight' => -100,
  );
  return $plugins;
}