interface AssetDataInterface in Media: Acquia DAM 8
Defines the asset data service interface.
Hierarchy
- interface \Drupal\media_acquiadam\AssetDataInterface
Expanded class hierarchy of AssetDataInterface
All classes that implement AssetDataInterface
2 files declare their use of AssetDataInterface
- AcquiadamServiceTest.php in tests/
src/ Unit/ AcquiadamServiceTest.php - AssetMediaFactoryTest.php in tests/
src/ Unit/ AssetMediaFactoryTest.php
File
- src/
AssetDataInterface.php, line 8
Namespace
Drupal\media_acquiadamView source
interface AssetDataInterface {
/**
* Returns data stored for an asset.
*
* @param int $assetID
* The ID of the asset that data is associated with.
* @param string $name
* (optional) The name of the data key.
*
* @return mixed|array
* The requested asset data, depending on the arguments passed:
* - If $name was provided then the stored value is returned, or NULL if
* no value was found.
* - If no $name was provided then all data will be returned for the given
* asset if found.
*/
public function get($assetID, $name = NULL);
/**
* Stores data for an asset.
*
* @param int $assetID
* The ID of the asset to store data against.
* @param string $name
* The name of the data key.
* @param mixed $value
* The value to store. Non-scalar values are serialized automatically.
*/
public function set($assetID, $name, $value);
/**
* Deletes data stored for an asset.
*
* @param int|array $assetID
* (optional) The ID of the asset the data is associated with. Can also
* be an array to delete the data of multiple assets.
* @param string $name
* (optional) The name of the data key. If omitted, all data associated with
* $assetID.
*/
public function delete($assetID = NULL, $name = NULL);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AssetDataInterface:: |
public | function | Deletes data stored for an asset. | 1 |
AssetDataInterface:: |
public | function | Returns data stored for an asset. | 1 |
AssetDataInterface:: |
public | function | Stores data for an asset. | 1 |