You are here

interface ConfigDiffInterface in Configuration Update Manager 8

Defines an interface for config differences.

Hierarchy

Expanded class hierarchy of ConfigDiffInterface

All classes that implement ConfigDiffInterface

1 file declares its use of ConfigDiffInterface
ConfigUpdateController.php in config_update_ui/src/Controller/ConfigUpdateController.php

File

src/ConfigDiffInterface.php, line 8

Namespace

Drupal\config_update
View source
interface ConfigDiffInterface {

  /**
   * Decides if two configuration arrays are considered to be the same.
   *
   * The two arrays are considered to be the same if, after "normalizing", they
   * have the same keys and values. It is up to the particular implementing
   * class to decide what normalizing means.
   *
   * @param array|null $source
   *   Source config.
   * @param array|null $target
   *   Target config.
   *
   * @return bool
   *   TRUE if the source and target are the same, and FALSE if they are
   *   different.
   */
  public function same($source, $target);

  /**
   * Calculates differences between config.
   *
   * The two arrays are "normalized" and split into lines to compare
   * differences. It is up to the particular implementing class to decide what
   * normalizing means.
   *
   * @param array|null $source
   *   Source config.
   * @param array|null $target
   *   Target config.
   *
   * @return \Drupal\Component\Diff\Diff
   *   Diff object for displaying line-by-line differences between source and
   *   target config.
   */
  public function diff($source, $target);

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigDiffInterface::diff public function Calculates differences between config. 1
ConfigDiffInterface::same public function Decides if two configuration arrays are considered to be the same. 1