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

Breadcrumb

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

function JsonConfigSource::removeLink

@inheritDoc

Overrides ConfigSourceInterface::removeLink

File

vendor/composer/composer/src/Composer/Config/JsonConfigSource.php, line 195

Class

JsonConfigSource
JSON Configuration Source

Namespace

Composer\Config

Code

public function removeLink(string $type, string $name) : void {
    $this->manipulateJson('removeSubNode', static function (&$config, $type, $name) : void {
        unset($config[$type][$name]);
    }, $type, $name);
    $this->manipulateJson('removeMainKeyIfEmpty', static function (&$config, $type) : void {
        if (0 === count($config[$type])) {
            unset($config[$type]);
        }
    }, $type);
}

API Navigation

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