You are here

public function MediaDirectoriesController::__construct in Media Directories 8

Same name and namespace in other branches
  1. 3.x modules/media_directories_ui/src/Controller/MediaDirectoriesController.php \Drupal\media_directories_ui\Controller\MediaDirectoriesController::__construct()
  2. 2.x modules/media_directories_ui/src/Controller/MediaDirectoriesController.php \Drupal\media_directories_ui\Controller\MediaDirectoriesController::__construct()

MediaDirectoriesController constructor.

Parameters

\Drupal\Core\Form\FormBuilder $formBuilder: The form builder.

\Drupal\Core\Render\RendererInterface $renderer: The renderer service.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

File

modules/media_directories_ui/src/Controller/MediaDirectoriesController.php, line 90

Class

MediaDirectoriesController
Main controller class.

Namespace

Drupal\media_directories_ui\Controller

Code

public function __construct(FormBuilder $formBuilder, RendererInterface $renderer, ModuleHandlerInterface $module_handler, LanguageManagerInterface $language_manager) {
  $this->formBuilder = $formBuilder;
  $this->renderer = $renderer;
  $this->moduleHandler = $module_handler;
  $this->languageManager = $language_manager;
  $config = $this
    ->config('media_directories.settings');
  $this->vocabularyId = $config
    ->get('directory_taxonomy');
  $this->contentTranslationEnabled = $this->moduleHandler
    ->moduleExists('content_translation');
}