You are here

public function RdfMapping::getFieldMapping in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/rdf/src/Entity/RdfMapping.php \Drupal\rdf\Entity\RdfMapping::getFieldMapping()

Gets the mapping config for a field.

This function returns the field mapping as stored in config, which may contain CURIE arrays. If the mapping is needed for output in a serialization format, such as RDFa, then getPreparedFieldMapping() should be used instead.

Parameters

string $field_name: The name of the field.

Return value

array The field mapping config array, or an empty array if there is no mapping.

Overrides RdfMappingInterface::getFieldMapping

File

core/modules/rdf/src/Entity/RdfMapping.php, line 117
Contains \Drupal\rdf\Entity\RdfMapping.

Class

RdfMapping
Config entity for working with RDF mappings.

Namespace

Drupal\rdf\Entity

Code

public function getFieldMapping($field_name) {
  if (isset($this->fieldMappings[$field_name])) {
    return $this->fieldMappings[$field_name];
  }
  return array();
}