You are here

public function LinkitProfile::setEnabledsearchPlugins in Linkit 7.3

Set all enabled search plugins.

1 call to LinkitProfile::setEnabledsearchPlugins()
LinkitProfile::getEnabledsearchPlugins in includes/profile.class.php
Construct an array with all enabled search plugins for this profile.

File

includes/profile.class.php, line 57
Linkit Profile class.

Class

LinkitProfile
Linkit Profile class implementation.

Code

public function setEnabledsearchPlugins() {

  // Sort plugins by weight.
  uasort($this->data['search_plugins'], 'linkit_sort_plugins_by_weight');
  foreach ($this->data['search_plugins'] as $plugin_name => $plugin) {
    if ($plugin['enabled']) {

      // Load plugin definition.
      $plugin_definition = linkit_search_plugin_load($plugin_name);

      // Get a Linkit search plugin object.
      $search_plugin = LinkitSearchPlugin::factory($plugin_definition, $this);

      // Only register none broken plugins.
      if ($search_plugin
        ->broken() !== TRUE) {
        $this->enabled_search_plugins[$plugin_name] = $search_plugin;
      }
    }
  }
}