You are here

function hook_linkit_search_plugin_entities_alter in Linkit 7.3

Implements hook_linkit_plugin_entities_alter().

The default behavior for entities is that they will use the default entity search plugin class, which will provide them with the basic methods they need.

There may be some search plugins that will extend those basic methods with more advanced ones, therefore the handlers for those plugins will have to be changed.

Make sure that your classes are included in the registry. The easiest way to do this is to define them as so:

<code> files[] = plugins/linkit_search/my_custom_plugin.class.php </code>

Parameters

$plugins: An array of all search plugins processed within Linkit entity plugin.

1 invocation of hook_linkit_search_plugin_entities_alter()
linkit_entity_ctools_linkit_get_children in plugins/linkit_search/entity.inc
Get all child Linkit search plugins.

File

./linkit.api.php, line 22

Code

function hook_linkit_search_plugin_entities_alter(&$plugins) {
  $path = drupal_get_path('module', 'mymodule') . '/plugins/linkit_search';
  if (isset($plugins['my_custom_plugin'])) {
    $handler = array(
      'class' => 'MyCustomPlugin',
      'file' => 'my_custom_plugin.class.php',
      'path' => $path,
    );
    $plugins['my_custom_plugin']['handler'] = $handler;
  }
}