Returns all local task items attached to this task.
array $conditions: Additional conditions.
\Drupal\tmgmt_local\Entity\LocalTaskItem[] An array of local task items.
Overrides LocalTaskInterface::getItems
public function getItems($conditions = array()) {
$query = \Drupal::entityQuery('tmgmt_local_task_item');
$query
->accessCheck(TRUE);
$query
->condition('tltid', $this
->id());
foreach ($conditions as $key => $condition) {
if (is_array($condition)) {
$operator = isset($condition['operator']) ? $condition['operator'] : '=';
$query
->condition($key, $condition['value'], $operator);
}
else {
$query
->condition($key, $condition);
}
}
$query
->sort('tltiid');
$results = $query
->execute();
if (!empty($results)) {
return LocalTaskItem::loadMultiple($results);
}
return array();
}