public function BynderApiTest::addAssetUsage in Bynder 8
Same name and namespace in other branches
- 8.3 tests/modules/bynder_test_module/src/BynderApiTest.php \Drupal\bynder_test_module\BynderApiTest::addAssetUsage()
- 8.2 tests/modules/bynder_test_module/src/BynderApiTest.php \Drupal\bynder_test_module\BynderApiTest::addAssetUsage()
- 4.0.x tests/modules/bynder_test_module/src/BynderApiTest.php \Drupal\bynder_test_module\BynderApiTest::addAssetUsage()
Sets values in state.
Parameters
string $integration_id: The Drupal 8 integration id.
string $asset_id: The Bynder media id.
string $timestamp: Current timestamp.
string $location: Url location for entity that references this asset.
string $additional: Additional media info.
Overrides BynderApi::addAssetUsage
File
- tests/
modules/ bynder_test_module/ src/ BynderApiTest.php, line 195
Class
- BynderApiTest
- Bynder API test service.
Namespace
Drupal\bynder_test_moduleCode
public function addAssetUsage($asset_id, $usage_url, $creation_date, $additional_info = NULL) {
$values = [
'integration_id' => $this
->getIntegrationId(),
'asset_id' => $asset_id,
'timestamp' => $creation_date,
'location' => $usage_url,
'additional' => $additional_info,
];
$this->state
->set('bynder.bynder_add_usage', $values);
}