function PrerenderList::getItems
Same name in other branches
- 8.9.x core/modules/views/src/Plugin/views/field/PrerenderList.php \Drupal\views\Plugin\views\field\PrerenderList::getItems()
- 10 core/modules/views/src/Plugin/views/field/PrerenderList.php \Drupal\views\Plugin\views\field\PrerenderList::getItems()
- 11.x core/modules/views/src/Plugin/views/field/PrerenderList.php \Drupal\views\Plugin\views\field\PrerenderList::getItems()
Items should be stored in the result array, if possible, as an array with 'value' as the actual displayable value of the item, plus any items that might be found in the 'alter' options array for creating links, such as 'path', 'fragment', 'query' etc, such a thing is to be made. Additionally, items that might be turned into tokens should also be in this array.
Overrides MultiItemsFieldHandlerInterface::getItems
File
-
core/
modules/ views/ src/ Plugin/ views/ field/ PrerenderList.php, line 108
Class
- PrerenderList
- Field handler to provide a list of items.
Namespace
Drupal\views\Plugin\views\fieldCode
public function getItems(ResultRow $values) {
$field = $this->getValue($values);
if (!empty($this->items[$field])) {
return $this->items[$field];
}
return [];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.