diff --git a/src/Entity/Index.php b/src/Entity/Index.php index 9e8990b..59a9f21 100644 --- a/src/Entity/Index.php +++ b/src/Entity/Index.php @@ -145,7 +145,12 @@ class Index extends ConfigEntityBase implements IndexInterface { * * @var array */ - protected $tracker_settings = array('default' => array('plugin_id' => 'default', 'settings' => array())); + protected $tracker_settings = array( + 'default' => array( + 'plugin_id' => 'default', + 'settings' => array() + ), + ); /** * The tracker plugin instance. @@ -194,7 +199,7 @@ class Index extends ConfigEntityBase implements IndexInterface { * * @see loadProcessors() */ - protected $processorPlugins; + protected $processorInstances; /** * Whether reindexing has been triggered for this index in this page request. @@ -483,13 +488,13 @@ class Index extends ConfigEntityBase implements IndexInterface { * The loaded processors, keyed by processor ID. */ protected function loadProcessors() { - if (empty($this->processorPlugins)) { + if (empty($this->processorInstances)) { /** @var $processor_plugin_manager \Drupal\search_api\Processor\ProcessorPluginManager */ $processor_plugin_manager = \Drupal::service('plugin.manager.search_api.processor'); $processor_settings = $this->getProcessorSettings(); foreach ($processor_plugin_manager->getDefinitions() as $name => $processor_definition) { - if (class_exists($processor_definition['class']) && empty($this->processorPlugins[$name])) { + if (class_exists($processor_definition['class']) && empty($this->processorInstances[$name])) { // Create our settings for this processor. $settings = empty($processor_settings[$name]['settings']) ? array() : $processor_settings[$name]['settings']; $settings['index'] = $this; @@ -497,7 +502,7 @@ class Index extends ConfigEntityBase implements IndexInterface { /** @var $processor \Drupal\search_api\Processor\ProcessorInterface */ $processor = $processor_plugin_manager->createInstance($name, $settings); if ($processor->supportsIndex($this)) { - $this->processorPlugins[$name] = $processor; + $this->processorInstances[$name] = $processor; } } elseif (!class_exists($processor_definition['class'])) { @@ -506,7 +511,7 @@ class Index extends ConfigEntityBase implements IndexInterface { } } - return $this->processorPlugins; + return $this->processorInstances; } /** @@ -1014,7 +1019,7 @@ class Index extends ConfigEntityBase implements IndexInterface { $this->datasourceInstances = NULL; $this->trackerInstance = NULL; $this->serverInstance = NULL; - $this->processorPlugins = NULL; + $this->processorInstances = NULL; $this->cache = array(); if ($include_stored) { Cache::invalidateTags($this->getCacheTags()); @@ -1605,10 +1610,10 @@ class Index extends ConfigEntityBase implements IndexInterface { */ public function __sleep() { $properties = get_object_vars($this); - unset($properties['datasourcePlugins']); - unset($properties['trackerPlugin']); + unset($properties['datasourceInstances']); + unset($properties['trackerInstance']); unset($properties['serverInstance']); - unset($properties['processorPlugins']); + unset($properties['processorInstances']); unset($properties['cache']); return array_keys($properties); }