configFactory = \Drupal::configFactory(); } /** * {@inheritdoc} */ public function getName() { return t('Library definitions'); } /** * {@inheritdoc} */ public function getDescription() { return t('Provides access to library definition files.'); } /** * {@inheritdoc} */ public function getDirectoryPath() { return $this->getConfig('local.path'); } /** * Fetches a configuration value from the library definitions configuration. * @param $key * The configuration key to fetch. * * @return array|mixed|null * The configuration value. */ protected function getConfig($key) { return $this->configFactory ->get('libraries.settings') ->get("definitions.$key"); } }