public function ViewsBulkOperationsActionProcessor::getLabels in Views Bulk Operations (VBO) 8.3
Same name and namespace in other branches
- 4.0.x src/Service/ViewsBulkOperationsActionProcessor.php \Drupal\views_bulk_operations\Service\ViewsBulkOperationsActionProcessor::getLabels()
Get the current processing entity queue.
Parameters
array $view_data: Data concerning the view that will be processed.
Return value
array Array of entity labels.
Overrides ViewsBulkOperationsActionProcessorInterface::getLabels
File
- src/
Service/ ViewsBulkOperationsActionProcessor.php, line 181
Class
- ViewsBulkOperationsActionProcessor
- Defines VBO action processor.
Namespace
Drupal\views_bulk_operations\ServiceCode
public function getLabels(array $view_data) {
$this
->initialize($view_data);
// We don't want to load too many entities here due to performance reasons.
if (count($view_data['list']) > self::MAX_LIST_COUNT) {
$view_data['list'] = array_slice($view_data['list'], 0, self::MAX_LIST_COUNT);
}
$this
->populateQueue($view_data);
$labels = [];
foreach ($this->queue as $entity) {
$labels[] = $entity
->label();
}
return $labels;
}