You are here

public function RdfMapping::setFieldMapping in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/rdf/src/Entity/RdfMapping.php \Drupal\rdf\Entity\RdfMapping::setFieldMapping()
  2. 9 core/modules/rdf/src/Entity/RdfMapping.php \Drupal\rdf\Entity\RdfMapping::setFieldMapping()

Sets the mapping config for a field.

Parameters

string $field_name: The name of the field.

array $mapping: The field mapping.

Return value

\Drupal\rdf\Entity\RdfMapping The RdfMapping object.

Overrides RdfMappingInterface::setFieldMapping

File

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

Class

RdfMapping
Config entity for working with RDF mappings.

Namespace

Drupal\rdf\Entity

Code

public function setFieldMapping($field_name, array $mapping = []) {
  $this->fieldMappings[$field_name] = $mapping;
  return $this;
}