You are here

public function RdfMapping::getBundleMapping in Drupal 10

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

Gets the mapping config for the bundle-level data.

This function returns the bundle 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 getPreparedBundleMapping() should be used instead.

Return value

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

Overrides RdfMappingInterface::getBundleMapping

File

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

Class

RdfMapping
Config entity for working with RDF mappings.

Namespace

Drupal\rdf\Entity

Code

public function getBundleMapping() {
  if (!empty($this->types)) {
    return [
      'types' => $this->types,
    ];
  }
  return [];
}