You are here

class ConfigDistroController in Config Distro 8

Returns responses for config module routes.

Hierarchy

Expanded class hierarchy of ConfigDistroController

File

src/Controller/ConfigDistroController.php, line 13

Namespace

Drupal\config_distro\Controller
View source
class ConfigDistroController extends ConfigController implements ContainerInjectionInterface {

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container) {
    $class = parent::create($container);

    // Substitute our storage for the default one.
    $class->syncStorage = $container
      ->get('config_distro.storage.distro');
    return $class;
  }

  /**
   * {@inheritdoc}
   */
  public function diff($source_name, $target_name = NULL, $collection = NULL) {
    $build = parent::diff($source_name, $target_name, $collection);
    $build['back']['#url'] = Url::fromRoute('config_distro.import');
    return $build;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigController::$configManager protected property The configuration manager.
ConfigController::$diffFormatter protected property The diff formatter.
ConfigController::$exportStorage protected property The export storage.
ConfigController::$fileDownloadController protected property The file download controller.
ConfigController::$fileSystem protected property The file system.
ConfigController::$importTransformer protected property The import transformer service.
ConfigController::$syncStorage protected property The sync storage.
ConfigController::$targetStorage protected property The target storage.
ConfigController::downloadExport public function Downloads a tarball of the site configuration.
ConfigController::__construct public function Constructs a ConfigController object.
ConfigDistroController::create public static function Instantiates a new instance of this class. Overrides ConfigController::create
ConfigDistroController::diff public function Shows diff of specified configuration file. Overrides ConfigController::diff