storm-1.x-dev/src/Controller/StormConfigurationController.php

src/Controller/StormConfigurationController.php
<?php

namespace Drupal\storm\Controller;

use Drupal\Core\Controller\ControllerBase;
use Drupal\system\SystemManager;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
 * Returns responses for Storm routes.
 */
class StormConfigurationController extends ControllerBase {

  /**
   * System Manager Service.
   *
   * @var \Drupal\system\SystemManager
   */
  protected $systemManager;

  /**
   * Constructs a new SystemController.
   *
   * @param \Drupal\system\SystemManager $systemManager
   *   System manager service.
   */
  public function __construct(SystemManager $systemManager) {
    $this->systemManager = $systemManager;
  }

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container) {
    return new static(
      $container->get('system.manager')
    );
  }

  /**
   * Builds the response.
   */
  public function build() {
    return $this->systemManager->getBlockContents();
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc