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

Breadcrumb

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

function Collection::__construct

Same name in this branch
  1. 11.1.x vendor/symfony/validator/Constraints/Collection.php \Symfony\Component\Validator\Constraints\Collection::__construct()
  2. 11.1.x vendor/phpdocumentor/type-resolver/src/Types/Collection.php \phpDocumentor\Reflection\Types\Collection::__construct()

Constructs a collection object of the specified type, optionally with the specified data.

Parameters

string $collectionType The type or class name associated with this: collection.

array<array-key, T> $data The initial items to store in the collection.:

Overrides AbstractArray::__construct

File

vendor/ramsey/collection/src/Collection.php, line 86

Class

Collection
A collection represents a group of objects.

Namespace

Ramsey\Collection

Code

public function __construct(string $collectionType, array $data = []) {
    parent::__construct($data);
}
RSS feed
Powered by Drupal