Drupal 8  8.0.2
RdfMapping Class Reference
Inheritance diagram for RdfMapping:

Public Member Functions

 getPreparedBundleMapping ()
 
 getBundleMapping ()
 
 setBundleMapping (array $mapping)
 
 getPreparedFieldMapping ($field_name)
 
 getFieldMapping ($field_name)
 
 setFieldMapping ($field_name, array $mapping=array())
 
 id ()
 
 calculateDependencies ()
 
 postSave (EntityStorageInterface $storage, $update=TRUE)
 
- Public Member Functions inherited from ConfigEntityBase
 __construct (array $values, $entity_type)
 
 getOriginalId ()
 
 setOriginalId ($id)
 
 isNew ()
 
 get ($property_name)
 
 set ($property_name, $value)
 
 enable ()
 
 disable ()
 
 setStatus ($status)
 
 status ()
 
 setSyncing ($syncing)
 
 isSyncing ()
 
 setUninstalling ($uninstalling)
 
 isUninstalling ()
 
 createDuplicate ()
 
 preSave (EntityStorageInterface $storage)
 
 calculateDependencies ()
 
 urlInfo ($rel= 'edit-form', array $options=[])
 
 url ($rel= 'edit-form', $options=array())
 
 link ($text=NULL, $rel= 'edit-form', array $options=[])
 
 toUrl ($rel= 'edit-form', array $options=[])
 
 getCacheTagsToInvalidate ()
 
 getDependencies ()
 
 getConfigDependencyName ()
 
 getConfigTarget ()
 
 onDependencyRemoval (array $dependencies)
 
 setThirdPartySetting ($module, $key, $value)
 
 getThirdPartySetting ($module, $key, $default=NULL)
 
 getThirdPartySettings ($module)
 
 unsetThirdPartySetting ($module, $key)
 
 getThirdPartyProviders ()
 
 isInstallable ()
 
 trustData ()
 
 hasTrustedData ()
 
 save ()
 
- Public Member Functions inherited from Entity
 __construct (array $values, $entity_type)
 
 id ()
 
 uuid ()
 
 isNew ()
 
 enforceIsNew ($value=TRUE)
 
 getEntityTypeId ()
 
 bundle ()
 
 label ()
 
 urlInfo ($rel= 'canonical', array $options=[])
 
 toUrl ($rel= 'canonical', array $options=[])
 
 hasLinkTemplate ($rel)
 
 link ($text=NULL, $rel= 'canonical', array $options=[])
 
 toLink ($text=NULL, $rel= 'canonical', array $options=[])
 
 url ($rel= 'canonical', $options=array())
 
 uriRelationships ()
 
 access ($operation, AccountInterface $account=NULL, $return_as_object=FALSE)
 
 language ()
 
 save ()
 
 delete ()
 
 createDuplicate ()
 
 getEntityType ()
 
 preSave (EntityStorageInterface $storage)
 
 postSave (EntityStorageInterface $storage, $update=TRUE)
 
 postCreate (EntityStorageInterface $storage)
 
 referencedEntities ()
 
 getCacheContexts ()
 
 getCacheTagsToInvalidate ()
 
 getCacheTags ()
 
 getCacheMaxAge ()
 
 getOriginalId ()
 
 setOriginalId ($id)
 
 toArray ()
 
 getTypedData ()
 
 __sleep ()
 
 getConfigDependencyKey ()
 
 getConfigDependencyName ()
 
 getConfigTarget ()
 
- Public Member Functions inherited from RefinableCacheableDependencyInterface
 addCacheContexts (array $cache_contexts)
 
 addCacheTags (array $cache_tags)
 
 mergeCacheMaxAge ($max_age)
 
 addCacheableDependency ($other_object)
 

Protected Attributes

 $id
 
 $targetEntityType
 
 $bundle
 
 $types = array()
 
 $fieldMappings = array()
 
- Protected Attributes inherited from ConfigEntityBase
 $originalId
 
 $pluginConfigKey
 
 $status = TRUE
 
 $uuid
 
 $langcode = 'en'
 
 $third_party_settings = array()
 
 $_core = []
 
 $trustedData = FALSE
 
- Protected Attributes inherited from Entity
 $entityTypeId
 
 $enforceIsNew
 
 $typedData
 

Additional Inherited Members

- Static Public Member Functions inherited from ConfigEntityBase
static sort (ConfigEntityInterface $a, ConfigEntityInterface $b)
 
- Static Public Member Functions inherited from Entity
static preCreate (EntityStorageInterface $storage, array &$values)
 
static preDelete (EntityStorageInterface $storage, array $entities)
 
static postDelete (EntityStorageInterface $storage, array $entities)
 
static postLoad (EntityStorageInterface $storage, array &$entities)
 
static load ($id)
 
static loadMultiple (array $ids=NULL)
 
static create (array $values=array())
 
- Protected Member Functions inherited from ConfigEntityBase
 getTypedConfig ()
 
 addDependency ($type, $name)
 
 invalidateTagsOnSave ($update)
 
- Protected Member Functions inherited from Entity
 entityManager ()
 
 entityTypeManager ()
 
 languageManager ()
 
 uuidGenerator ()
 
 linkTemplates ()
 
 urlRouteParameters ($rel)
 
 invalidateTagsOnSave ($update)
 
- Static Protected Member Functions inherited from ConfigEntityBase
static invalidateTagsOnDelete (EntityTypeInterface $entity_type, array $entities)
 
static getConfigManager ()
 
- Static Protected Member Functions inherited from Entity
static invalidateTagsOnDelete (EntityTypeInterface $entity_type, array $entities)
 

Detailed Description

Config entity for working with RDF mappings.

( id = "rdf_mapping", label = ("RDF mapping"), config_prefix = "mapping", entity_keys = { "id" = "id" }, config_export = { "id", "targetEntityType", "bundle", "types", "fieldMappings", } )

Member Function Documentation

calculateDependencies ( )

{Calculates dependencies and stores them in the dependency property.

Returns
$this
See Also
}

Implements ConfigEntityInterface.

References ConfigEntityBase\addDependency(), Entity\bundle(), and Drupal\entityManager().

Here is the call graph for this function:

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.

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

Implements 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_nameThe name of the field.
Returns
array The field mapping config array, or an empty array if there is no mapping.
}

Implements 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.

Returns
array The bundle mapping.
}

Implements 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_nameThe name of the field.
Returns
array The prepared field mapping, or an empty array if there is no mapping.
}

Implements RdfMappingInterface.

id ( )

{Gets the identifier.

Returns
string|int|null The entity identifier, or NULL if the object does not yet have an identifier.
}

Implements EntityInterface.

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$storageThe entity storage object.
bool$updateTRUE if the entity has been updated, or FALSE if it has been inserted.
}

Implements EntityInterface.

References Drupal\entityManager().

Here is the call graph for this function:

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$mappingThe bundle mapping.
Returns
The RdfMapping object.
}

Implements RdfMappingInterface.

setFieldMapping (   $field_name,
array  $mapping = array() 
)

{Sets the mapping config for a field.

Parameters
string$field_nameThe name of the field.
array$mappingThe field mapping.
Returns
The RdfMapping object.
}

Implements RdfMappingInterface.


The documentation for this class was generated from the following file: