diff --git a/src/Entity/Index.php b/src/Entity/Index.php index c06b47f..9e8990b 100644 --- a/src/Entity/Index.php +++ b/src/Entity/Index.php @@ -138,7 +138,7 @@ class Index extends ConfigEntityBase implements IndexInterface { * * @see getDatasources() */ - protected $datasourcePlugins; + protected $datasourceInstances; /** * The tracker settings @@ -313,20 +313,20 @@ class Index extends ConfigEntityBase implements IndexInterface { * {@inheritdoc} */ public function getDatasources($only_enabled = TRUE) { - if (!isset($this->datasourcePlugins)) { - $this->datasourcePlugins = array(); + if (!isset($this->datasourceInstances)) { + $this->datasourceInstances = array(); /** @var $datasource_plugin_manager \Drupal\search_api\Datasource\DatasourcePluginManager */ $datasource_plugin_manager = \Drupal::service('plugin.manager.search_api.datasource'); foreach ($datasource_plugin_manager->getDefinitions() as $name => $datasource_definition) { - if (class_exists($datasource_definition['class']) && empty($this->datasourcePlugins[$name])) { + if (class_exists($datasource_definition['class']) && empty($this->datasourceInstances[$name])) { // Create our settings for this datasource. $config = isset($this->datasource_settings[$name]) ? $this->datasource_settings[$name]['settings'] : array(); $config += array('index' => $this); /** @var $datasource \Drupal\search_api\Datasource\DatasourceInterface */ $datasource = $datasource_plugin_manager->createInstance($name, $config); - $this->datasourcePlugins[$name] = $datasource; + $this->datasourceInstances[$name] = $datasource; } elseif (!class_exists($datasource_definition['class'])) { \Drupal::logger('search_api')->warning('Datasource @id specifies a non-existing @class.', array('@id' => $name, '@class' => $datasource_definition['class'])); @@ -336,10 +336,10 @@ class Index extends ConfigEntityBase implements IndexInterface { // Filter datasources by status if required. if (!$only_enabled) { - return $this->datasourcePlugins; + return $this->datasourceInstances; } - return array_intersect_key($this->datasourcePlugins, array_flip(array_keys($this->datasource_settings))); + return array_intersect_key($this->datasourceInstances, array_flip(array_keys($this->datasource_settings))); } /** @@ -1011,7 +1011,7 @@ class Index extends ConfigEntityBase implements IndexInterface { * {@inheritdoc} */ public function resetCaches($include_stored = TRUE) { - $this->datasourcePlugins = NULL; + $this->datasourceInstances = NULL; $this->trackerInstance = NULL; $this->serverInstance = NULL; $this->processorPlugins = NULL;