You are here

public function BlockVisibilityGroup::addCondition in Block Visibility Groups 8

File

src/Entity/BlockVisibilityGroup.php, line 168

Class

BlockVisibilityGroup
Defines the Block Visibility Group entity.

Namespace

Drupal\block_visibility_groups\Entity

Code

public function addCondition(array $configuration) {
  $configuration['uuid'] = $this
    ->uuidGenerator()
    ->generate();
  $this
    ->getConditions()
    ->addInstanceId($configuration['uuid'], $configuration);
  return $configuration['uuid'];
}