Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Core / Entity / EntityListBuilderInterface.php
1 <?php
2
3 namespace Drupal\Core\Entity;
4
5 /**
6  * Defines an interface to build entity listings.
7  */
8 interface EntityListBuilderInterface {
9
10   /**
11    * Gets the entity storage.
12    *
13    * @return \Drupal\Core\Entity\EntityStorageInterface
14    *   The storage used by this list builder.
15    */
16   public function getStorage();
17
18   /**
19    * Loads entities of this type from storage for listing.
20    *
21    * This allows the implementation to manipulate the listing, like filtering or
22    * sorting the loaded entities.
23    *
24    * @return \Drupal\Core\Entity\EntityInterface[]
25    *   An array of entities implementing \Drupal\Core\Entity\EntityInterface
26    *   indexed by their IDs. Returns an empty array if no matching entities are
27    *   found.
28    */
29   public function load();
30
31   /**
32    * Provides an array of information to build a list of operation links.
33    *
34    * @param \Drupal\Core\Entity\EntityInterface $entity
35    *   The entity the operations are for.
36    *
37    * @return array
38    *   An associative array of operation link data for this list, keyed by
39    *   operation name, containing the following key-value pairs:
40    *   - title: The localized title of the operation.
41    *   - url: An instance of \Drupal\Core\Url for the operation URL.
42    *   - weight: The weight of this operation.
43    */
44   public function getOperations(EntityInterface $entity);
45
46   /**
47    * Builds a listing of entities for the given entity type.
48    *
49    * @return array
50    *   A render array as expected by
51    *   \Drupal\Core\Render\RendererInterface::render().
52    */
53   public function render();
54
55 }