Browse Source

remove more deprecations

d9_islandora
Eli Zoller 4 years ago
parent
commit
eecbd83689
  1. 2
      src/Commands/IslandoraCommands.php
  2. 2
      src/Plugin/Condition/MediaSourceHasMimetype.php

2
src/Commands/IslandoraCommands.php

@ -122,7 +122,7 @@ class IslandoraCommands extends DrushCommands {
$account = $this->entityTypeManager->getStorage('user')->load($userid); $account = $this->entityTypeManager->getStorage('user')->load($userid);
$userSession = new UserSession([ $userSession = new UserSession([
'uid' => $account->id(), 'uid' => $account->id(),
'name' => $account->getUsername(), 'name' => $account->getDisplayName(),
'roles' => $account->getRoles(), 'roles' => $account->getRoles(),
]); ]);
$this->accountSwitcher->switchTo($userSession); $this->accountSwitcher->switchTo($userSession);

2
src/Plugin/Condition/MediaSourceHasMimetype.php

@ -12,7 +12,7 @@ use Drupal\file\Entity\File;
* @Condition( * @Condition(
* id = "media_source_mimetype", * id = "media_source_mimetype",
* label = @Translation("Media Source Mimetype"), * label = @Translation("Media Source Mimetype"),
* context = { * context_definitions = {
* "media" = @ContextDefinition("entity:media", required = FALSE, label = @Translation("Media")) * "media" = @ContextDefinition("entity:media", required = FALSE, label = @Translation("Media"))
* } * }
* ) * )

Loading…
Cancel
Save