Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RuleWatchGraph.php

function RuleWatchGraph::moveWatch

Moves a rule node from one watch chain to another

The rule node's watched literals are updated accordingly.

Parameters

int $fromLiteral A literal the node used to watch:

int $toLiteral A literal the node should watch now:

RuleWatchNode $node The rule node to be moved:

1 call to RuleWatchGraph::moveWatch()
RuleWatchGraph::propagateLiteral in vendor/composer/composer/src/Composer/DependencyResolver/RuleWatchGraph.php
Propagates a decision on a literal to all rules watching the literal

File

vendor/composer/composer/src/Composer/DependencyResolver/RuleWatchGraph.php, line 157

Class

RuleWatchGraph
The RuleWatchGraph efficiently propagates decisions to other rules

Namespace

Composer\DependencyResolver

Code

protected function moveWatch(int $fromLiteral, int $toLiteral, RuleWatchNode $node) : void {
    if (!isset($this->watchChains[$toLiteral])) {
        $this->watchChains[$toLiteral] = new RuleWatchChain();
    }
    $node->moveWatch($fromLiteral, $toLiteral);
    $this->watchChains[$fromLiteral]
        ->remove();
    $this->watchChains[$toLiteral]
        ->unshift($node);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal