locators[] = $locator; return $this; } /** * Locates a library. * * @param \Drupal\libraries\ExternalLibrary\Local\LocalLibraryInterface $library * The library to locate. * * @see \Drupal\libraries\ExternalLibrary\Local\LocatorInterface::locate() */ public function locate(LocalLibraryInterface $library) { foreach ($this->locators as $locator) { $locator->locate($library); if ($library->isInstalled()) { return; } } $library->setUninstalled(); } }