class ConfigDistroController in Config Distro 8
Returns responses for config module routes.
Hierarchy
- class \Drupal\config\Controller\ConfigController implements ContainerInjectionInterface
- class \Drupal\config_distro\Controller\ConfigDistroController implements ContainerInjectionInterface
Expanded class hierarchy of ConfigDistroController
File
- src/
Controller/ ConfigDistroController.php, line 13
Namespace
Drupal\config_distro\ControllerView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigController:: |
protected | property | The configuration manager. | |
ConfigController:: |
protected | property | The diff formatter. | |
ConfigController:: |
protected | property | The export storage. | |
ConfigController:: |
protected | property | The file download controller. | |
ConfigController:: |
protected | property | The file system. | |
ConfigController:: |
protected | property | The import transformer service. | |
ConfigController:: |
protected | property | The sync storage. | |
ConfigController:: |
protected | property | The target storage. | |
ConfigController:: |
public | function | Downloads a tarball of the site configuration. | |
ConfigController:: |
public | function | Constructs a ConfigController object. | |
ConfigDistroController:: |
public static | function |
Instantiates a new instance of this class. Overrides ConfigController:: |
|
ConfigDistroController:: |
public | function |
Shows diff of specified configuration file. Overrides ConfigController:: |