function RdfMappingInterface::setBundleMapping

Same name 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);

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