You are here

public function Drupal_RichSnippets_Apachesolr_ApachesolrSchemaPreprocessor::__construct in Rich Snippets 7

Implements Drupal_RichSnippets_SchemaPreprocessorAbstract::__construct().

Overrides Drupal_RichSnippets_SchemaPreprocessorInterface::__construct

File

lib/Drupal/RichSnippets/Apachesolr/ApachesolrSchemaPreprocessor.php, line 51
Contains Drupal_RichSnippets_Apachesolr_ApachesolrSchemaPreprocessor.

Class

Drupal_RichSnippets_Apachesolr_ApachesolrSchemaPreprocessor
Rich Snippets preprocessor for the Apache Solr Search Integration module.

Code

public function __construct(array &$variables) {
  $this->_variables =& $variables;

  // Captures class variables.
  $this->_entityType = $variables['result']['entity_type'];
  $this->_bundle = $variables['result']['bundle'];
  $this->_solrFields = $variables['result']['fields'];

  // Decode the RDF schema mappings.
  if (isset($this->_solrFields['zm_rdf_schema_mappings'])) {
    $this->_rdfMappings = (array) drupal_json_decode($this->_solrFields['zm_rdf_schema_mappings'][0]);
  }

  // Delete the info split so we can populate it ourselves.
  $this->_variables['info_split'] = array();
}