You are here

public function RdfMappingInterface::setBundleMapping in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/rdf/src/RdfMappingInterface.php \Drupal\rdf\RdfMappingInterface::setBundleMapping()

Sets the mapping config for the bundle-level data.

This only sets bundle-level mappings, such as the RDF type. Mappings for a bundle's fields should be handled with setFieldMapping.

Example usage: -Map the 'article' bundle to 'sioc:Post'.

rdf_get_mapping('node', 'article')
  ->setBundleMapping(array(
  'types' => array(
    'sioc:Post',
  ),
))
  ->save();

Parameters

array $mapping: The bundle mapping.

Return value

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

1 method overrides RdfMappingInterface::setBundleMapping()
RdfMapping::setBundleMapping in core/modules/rdf/src/Entity/RdfMapping.php
Sets the mapping config for the bundle-level data.

File

core/modules/rdf/src/RdfMappingInterface.php, line 60

Class

RdfMappingInterface
Provides an interface defining an RDF mapping entity.

Namespace

Drupal\rdf

Code

public function setBundleMapping(array $mapping);