You are here

public function BynderApiTest::removeAssetUsage in Bynder 8.3

Same name and namespace in other branches
  1. 8 tests/modules/bynder_test_module/src/BynderApiTest.php \Drupal\bynder_test_module\BynderApiTest::removeAssetUsage()
  2. 8.2 tests/modules/bynder_test_module/src/BynderApiTest.php \Drupal\bynder_test_module\BynderApiTest::removeAssetUsage()
  3. 4.0.x tests/modules/bynder_test_module/src/BynderApiTest.php \Drupal\bynder_test_module\BynderApiTest::removeAssetUsage()

Sets values in state.

Parameters

string $integration_id: The Drupal 8 integration id.

string $asset_id: The Bynder media id.

string $location: Url location for entity that references this asset.

Overrides BynderApi::removeAssetUsage

File

tests/modules/bynder_test_module/src/BynderApiTest.php, line 222

Class

BynderApiTest
Bynder API test service.

Namespace

Drupal\bynder_test_module

Code

public function removeAssetUsage($asset_id, $usage_url = NULL) {
  $values = [
    'integration_id' => $this
      ->getIntegrationId(),
    'asset_id' => $asset_id,
    'location' => $usage_url,
  ];
  $this->state
    ->set('bynder.bynder_delete_usage', $values);
}