RdfMappingInterface::setBundleMapping

public RdfMappingInterface::setBundleMapping(array $mapping) 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\

RdfMappingInterface::getPreparedFieldMapping

public RdfMappingInterface::getPreparedFieldMapping($field_name) Gets the prepared mapping for a field. The prepared field mapping should be used when outputting data in RDF serializations such as RDFa. In the prepared mapping, the mapping configuration's CURIE arrays are processed into CURIE strings suitable for output. Parameters string $field_name: The name of the field. Return value array The prepared field mapping, or an empty array if there is no mapping. File core/modules/rdf/src/RdfMa

RdfMappingInterface::getPreparedBundleMapping

public RdfMappingInterface::getPreparedBundleMapping() Gets the mapping for the bundle-level data. The prepared bundle mapping should be used when outputting data in RDF serializations such as RDFa. In the prepared mapping, the mapping configuration's CURIE arrays are processed into CURIE strings suitable for output. Return value array The bundle mapping. File core/modules/rdf/src/RdfMappingInterface.php, line 23 Class RdfMappingInterface Provides an interface defining an RDF mapping enti

RdfMappingInterface::getFieldMapping

public RdfMappingInterface::getFieldMapping($field_name) Gets the mapping config for a field. This function returns the field 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 getPreparedFieldMapping() should be used instead. Parameters string $field_name: The name of the field. Return value array The field mapping config array, or an empty array if there is no mapping. File core/modules/rdf/src/RdfMa

RdfMappingInterface::getBundleMapping

public RdfMappingInterface::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. File core/modules/rdf/src/RdfMappingInterface.php, line 36 Class RdfMappingInterface Pr

RdfMappingInterface

Provides an interface defining an RDF mapping entity. Hierarchy interface \Drupal\Core\Entity\EntityInterface; interface \Drupal\Core\Config\Entity\ThirdPartySettingsInterfaceinterface \Drupal\Core\Config\Entity\ConfigEntityInterfaceinterface \Drupal\rdf\RdfMappingInterface File core/modules/rdf/src/RdfMappingInterface.php, line 10 Namespace Drupal\rdf Members Name Modifiers Type Description AccessibleInterface::access public function Checks data value access. Cachea

RdfMapping::setFieldMapping

public RdfMapping::setFieldMapping($field_name, array $mapping = array()) 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 122 Class RdfMapping Config entity for working with RDF mappings. Namespace Drupal\rdf\Entity Code public function setFie

RdfMapping::setBundleMapping

public RdfMapping::setBundleMapping(array $mapping) 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\Rd

RdfMapping::postSave

public RdfMapping::postSave(EntityStorageInterface $storage, $update = TRUE) Acts on a saved entity before the insert or update hook is invoked. Used after the entity is saved, but before invoking the insert or update hook. Note that in case of translatable content entities this callback is only fired on their current translation. It is up to the developer to iterate over all translations if needed. Parameters \Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object. bool

RdfMapping::id

public RdfMapping::id() Gets the identifier. Return value string|int|null The entity identifier, or NULL if the object does not yet have an identifier. Overrides Entity::id File core/modules/rdf/src/Entity/RdfMapping.php, line 130 Class RdfMapping Config entity for working with RDF mappings. Namespace Drupal\rdf\Entity Code public function id() { return $this->targetEntityType . '.' . $this->bundle; }