public ViewListBuilder::load()
Loads entities of this type from storage for listing.
This allows the implementation to manipulate the listing, like filtering or sorting the loaded entities.
Return value
\Drupal\Core\Entity\EntityInterface[] An array of entities implementing \Drupal\Core\Entity\EntityInterface.
Overrides ConfigEntityListBuilder::load
File
- core/modules/views_ui/src/ViewListBuilder.php, line 67
Class
- ViewListBuilder
- Defines a class to build a listing of view entities.
Namespace
Drupal\views_ui
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | public function load() { $entities = array ( 'enabled' => array (), 'disabled' => array (), ); foreach (parent::load() as $entity ) { if ( $entity ->status()) { $entities [ 'enabled' ][] = $entity ; } else { $entities [ 'disabled' ][] = $entity ; } } return $entities ; } |
Please login to continue.