You are here

class ConfigSyncController in Configuration Synchronizer 8

Returns responses for config module routes.

Hierarchy

Expanded class hierarchy of ConfigSyncController

File

src/Controller/ConfigSyncController.php, line 13

Namespace

Drupal\config_sync\Controller
View source
class ConfigSyncController extends ConfigController implements ContainerInjectionInterface {

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

    // Substitute our storage for the default one.
    $class->sourceStorage = $container
      ->get('config_sync.merged_storage');
    return $class;
  }

  /**
   * {@inheritdoc}
   */
  public function diff($source_name, $target_name = NULL, $collection = NULL) {
    $build = parent::diff($source_name, $target_name = NULL, $collection = NULL);
    $build['back']['#url'] = Url::fromRoute('config_sync.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.
ConfigSyncController::create public static function Instantiates a new instance of this class. Overrides ConfigController::create
ConfigSyncController::diff public function Shows diff of specified configuration file. Overrides ConfigController::diff