You are here

public function RobotsTxtController::__construct in RobotsTxt 8

Constructs a RobotsTxtController object.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config: Configuration object factory.

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

File

src/Controller/RobotsTxtController.php, line 40

Class

RobotsTxtController
Provides output robots.txt output.

Namespace

Drupal\robotstxt\Controller

Code

public function __construct(ConfigFactoryInterface $config, ModuleHandlerInterface $module_handler) {
  $this->moduleConfig = $config
    ->get('robotstxt.settings');
  $this->moduleHandler = $module_handler;
}