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

Breadcrumb

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

function CollectionInterface::merge

Merge current items and items of given collections into a new one.

Parameters

CollectionInterface<T> ...$collections The collections to merge.:

Return value

CollectionInterface<T>

Throws

CollectionMismatchException if unable to merge any of the given collections or items within the given collections due to type mismatch errors.

1 method overrides CollectionInterface::merge()
AbstractCollection::merge in vendor/ramsey/collection/src/AbstractCollection.php

File

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

Class

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

Namespace

Ramsey\Collection

Code

public function merge(CollectionInterface ...$collections) : self;

API Navigation

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