public RdfMapping::getPreparedFieldMapping($field_name)
Gets the prepared mapping for a field.
The prepared field mapping should be used when outputting data in RDF serializations such as RDFa. In the prepared mapping, the mapping configuration's CURIE arrays are processed into CURIE strings suitable for output.
Parameters
string $field_name: The name of the field.
Return value
array The prepared field mapping, or an empty array if there is no mapping.
Overrides RdfMappingInterface::getPreparedFieldMapping
File
- core/modules/rdf/src/Entity/RdfMapping.php, line 96
Class
- RdfMapping
- Config entity for working with RDF mappings.
Namespace
Drupal\rdf\Entity
Code
public function getPreparedFieldMapping($field_name) { $field_mapping = array( 'properties' => NULL, 'datatype' => NULL, 'datatype_callback' => NULL, 'mapping_type' => NULL, ); if (isset($this->fieldMappings[$field_name])) { $field_mapping = array_merge($field_mapping, $this->fieldMappings[$field_name]); } return empty($field_mapping['properties']) ? array() : $field_mapping; }
Please login to continue.