public function Drupal_RichSnippets_Node_NodeSchemaPreprocessor::getSchemaFields in Rich Snippets 7
Implements Drupal_RichSnippets_SchemaPreprocessorAbstract::getSchemaFields().
Overrides Drupal_RichSnippets_SchemaPreprocessorInterface::getSchemaFields
3 calls to Drupal_RichSnippets_Node_NodeSchemaPreprocessor::getSchemaFields()
- Drupal_RichSnippets_Node_NodeSchemaPreprocessor::addDateToInfo in lib/
Drupal/ RichSnippets/ Node/ NodeSchemaPreprocessor.php - Implements Drupal_RichSnippets_SchemaPreprocessorAbstract::addDateToInfo().
- Drupal_RichSnippets_Node_NodeSchemaPreprocessor::addImage in lib/
Drupal/ RichSnippets/ Node/ NodeSchemaPreprocessor.php - Implements Drupal_RichSnippets_SchemaPreprocessorAbstract::addImage().
- Drupal_RichSnippets_Node_NodeSchemaPreprocessor::addTextToInfo in lib/
Drupal/ RichSnippets/ Node/ NodeSchemaPreprocessor.php - Implements Drupal_RichSnippets_SchemaPreprocessorAbstract::addTextToInfo().
File
- lib/
Drupal/ RichSnippets/ Node/ NodeSchemaPreprocessor.php, line 74 - Contains Drupal_RichSnippets_Node_NodeSchemaPreprocessor.
Class
- Drupal_RichSnippets_Node_NodeSchemaPreprocessor
- Rich Snippets preprocessor for the Node module.
Code
public function getSchemaFields($schema) {
$schema_fields = array();
$rdf_mappings = rich_snippets_get_rdf_schema_mappings($this->_entityType, $this->_bundle);
if (!empty($rdf_mappings[$schema])) {
foreach ($rdf_mappings[$schema] as $field_name) {
$items = field_get_items($this->_entityType, $this->_entity, $field_name);
$schema_fields[$field_name] = $items ? $items : array();
}
}
return $schema_fields;
}