function RdfMapping::getPreparedFieldMapping

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

File

core/modules/rdf/src/Entity/RdfMapping.php, line 103

Class

RdfMapping
Config entity for working with RDF mappings.

Namespace

Drupal\rdf\Entity

Code

public function getPreparedFieldMapping($field_name) {
  $field_mapping = [
    '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']) ? [] : $field_mapping;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.