interface ListInterface

Interface for a list of typed data.

A list of typed data contains only items of the same type, is ordered and may contain duplicates.

When implementing this interface which extends Traversable, make sure to list IteratorAggregate or Iterator before this interface in the implements clause.

Hierarchy

  • interface \Drupal\Core\TypedData\ListInterface extends \ArrayAccess \Countable \Traversable

Expanded class hierarchy of ListInterface

All classes that implement ListInterface

1 file declares its use of ListInterface
FieldInterface.php in drupal/core/lib/Drupal/Core/Entity/Field/FieldInterface.php
Definition of Drupal\Core\Entity\Field\FieldInterface.

File

drupal/core/lib/Drupal/Core/TypedData/ListInterface.php, line 23
Definition of Drupal\Core\TypedData\ListInterface.

Namespace

Drupal\Core\TypedData
View source
interface ListInterface extends ArrayAccess, Countable, Traversable {

  /**
   * Determines whether the list contains any non-empty items.
   *
   * @return boolean
   *   TRUE if the list is empty, FALSE otherwise.
   */
  public function isEmpty();

}

Members

Namesort descending Modifiers Type Description Overrides
ListInterface::isEmpty public function Determines whether the list contains any non-empty items. 1