You are here

public static function ExternalPackageController::getOpignoSetting in Opigno module 8

Same name and namespace in other branches
  1. 3.x src/Controller/ExternalPackageController.php \Drupal\opigno_module\Controller\ExternalPackageController::getOpignoSetting()

Get a single option from opigno_module.settings.

Parameters

$settingName:

$fallback:

Return value

array|mixed

3 calls to ExternalPackageController::getOpignoSetting()
ExternalPackageController::getImagemagickBinPath in src/Controller/ExternalPackageController.php
Returns path to imagemagick bin.
ExternalPackageController::getLibreOfficeBinPath in src/Controller/ExternalPackageController.php
Returns path to libreoffice bin.
ExternalPackageController::getLibreofficeConfigsDir in src/Controller/ExternalPackageController.php
Returns libreoffice configurations directory.

File

src/Controller/ExternalPackageController.php, line 636

Class

ExternalPackageController
Class ActivitiesBrowserController.

Namespace

Drupal\opigno_module\Controller

Code

public static function getOpignoSetting($settingName, $fallback) {
  $config = \Drupal::configFactory()
    ->get('opigno_module.settings');
  $output = $config
    ->get($settingName);
  $output = !empty($output) ? $output : $fallback;
  return $output;
}