You are here

public function MongodbShortcutSetStorage::deleteAssignedShortcutSets in MongoDB 8

Delete shortcut sets assigned to users.

Parameters

\Drupal\shortcut\ShortcutSetInterface $entity: Delete the user assigned sets belonging to this shortcut.

Overrides ShortcutSetStorageInterface::deleteAssignedShortcutSets

File

mongodb_shortcut/src/MongodbShortcutSetStorage.php, line 96
Contains \Drupal\mongodb_shortcut\MongodbShortcutSetStorage.

Class

MongodbShortcutSetStorage

Namespace

Drupal\mongodb_shortcut

Code

public function deleteAssignedShortcutSets(ShortcutSetInterface $shortcut_set) {
  $this->mongo
    ->get('shortcut_set_users')
    ->remove([
    'set_name' => $shortcut_set
      ->id(),
  ]);
}