class DiffOpChange

Same name in other branches
  1. 9 core/lib/Drupal/Component/Diff/Engine/DiffOpChange.php \Drupal\Component\Diff\Engine\DiffOpChange
  2. 8.9.x core/lib/Drupal/Component/Diff/Engine/DiffOpChange.php \Drupal\Component\Diff\Engine\DiffOpChange
  3. 11.x core/lib/Drupal/Component/Diff/Engine/DiffOpChange.php \Drupal\Component\Diff\Engine\DiffOpChange

@todo document @private @subpackage DifferenceEngine

Hierarchy

  • class \Drupal\Component\Diff\Engine\DiffOp
    • class \Drupal\Component\Diff\Engine\DiffOpChange extends \Drupal\Component\Diff\Engine\DiffOp

Expanded class hierarchy of DiffOpChange

3 files declare their use of DiffOpChange
DiffEngineTest.php in core/tests/Drupal/Tests/Component/Diff/Engine/DiffEngineTest.php
DiffOpOutputBuilder.php in core/lib/Drupal/Component/Diff/DiffOpOutputBuilder.php
DiffOpOutputBuilderTest.php in core/tests/Drupal/Tests/Component/Diff/DiffOpOutputBuilderTest.php

File

core/lib/Drupal/Component/Diff/Engine/DiffOpChange.php, line 10

Namespace

Drupal\Component\Diff\Engine
View source
class DiffOpChange extends DiffOp {
    public $type = 'change';
    public function __construct($orig, $closing) {
        $this->orig = $orig;
        $this->closing = $closing;
    }
    
    /**
     * @deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no
     *   replacement.
     *
     * @see https://www.drupal.org/node/3337942
     */
    public function reverse() {
        @trigger_error(__METHOD__ . '() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3337942', E_USER_DEPRECATED);
        return new DiffOpChange($this->closing, $this->orig);
    }

}

Members

Title Sort descending Deprecated Modifiers Object type Summary Overriden Title
DiffOp::$closing public property
DiffOp::$orig public property
DiffOp::nclosing Deprecated public function
DiffOp::norig Deprecated public function
DiffOpChange::$type public property Overrides DiffOp::$type
DiffOpChange::reverse Deprecated public function Overrides DiffOp::reverse
DiffOpChange::__construct public function

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.