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

Breadcrumb

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

function AbstractMap::removeIf

Overrides MapInterface::removeIf

File

vendor/ramsey/collection/src/Map/AbstractMap.php, line 148

Class

AbstractMap
This class provides a basic implementation of `MapInterface`, to minimize the effort required to implement this interface.

Namespace

Ramsey\Collection\Map

Code

public function removeIf(int|string $key, mixed $value) : bool {
    if ($this->get($key) === $value) {
        unset($this[$key]);
        return true;
    }
    return false;
}

API Navigation

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