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

Breadcrumb

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

function CollectionInterface::contains

Returns `true` if this collection contains the specified element.

Parameters

T $element The element to check whether the collection contains.:

bool $strict Whether to perform a strict type check on the value.:

1 method overrides CollectionInterface::contains()
AbstractCollection::contains in vendor/ramsey/collection/src/AbstractCollection.php
Returns `true` if this collection contains the specified element.

File

vendor/ramsey/collection/src/CollectionInterface.php, line 69

Class

CollectionInterface
A collection represents a group of values, known as its elements.

Namespace

Ramsey\Collection

Code

public function contains(mixed $element, bool $strict = true) : bool;

API Navigation

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