installed; } /** * Marks the library as uninstalled. * * A corresponding method to mark the library as installed is not provided as * an installed library should have a library path, so that * LocalLibraryInterface::setLibraryPath() can be used instead. * * @return $this * * @see \Drupal\libraries\ExternalLibrary\Local\LocalLibraryInterface::setUninstalled() */ public function setUninstalled() { $this->installed = FALSE; return $this; } /** * Gets the path to the library. * * @return string * The path to the library relative to the app root. * * @throws \Drupal\libraries\ExternalLibrary\Exception\LibraryNotInstalledException * * @see \Drupal\libraries\ExternalLibrary\Local\LocalLibraryInterface::getLocalPath() */ public function getLocalPath() { if (!$this->isInstalled()) { /** @var \Drupal\libraries\ExternalLibrary\Local\LocalLibraryInterface $this */ throw new LibraryNotInstalledException($this); } return $this->localPath; } /** * Sets the library path of the library. * * @param string $path * The path to the library. * * @see \Drupal\libraries\ExternalLibrary\Local\LocalLibraryInterface::getLocalPath() */ public function setLocalPath($path) { $this->installed = TRUE; $this->localPath = (string) $path; assert('$this->localPath !== ""'); assert('$this->localPath[0] !== "/"'); } }