function OpenerResolver::addOpener

Same name in other branches
  1. 11.x core/modules/media_library/src/OpenerResolver.php \Drupal\media_library\OpenerResolver::addOpener()

Registers an opener.

Parameters

\Drupal\media_library\MediaLibraryOpenerInterface $opener: The opener.

string $id: The service ID.

File

core/modules/media_library/src/OpenerResolver.php, line 32

Class

OpenerResolver
Defines a class to resolve media library openers.

Namespace

Drupal\media_library

Code

public function addOpener(MediaLibraryOpenerInterface $opener, string $id) : void {
    $this->openers[$id] = $opener;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.