public function ILTListBuilder::getDefaultOperations in Opigno Instructor-led Trainings 3.x
Same name and namespace in other branches
- 8 src/ILTListBuilder.php \Drupal\opigno_ilt\ILTListBuilder::getDefaultOperations()
Gets this list's default operations.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity the operations are for.
Return value
array The array structure is identical to the return value of self::getOperations().
Overrides EntityListBuilder::getDefaultOperations
File
- src/
ILTListBuilder.php, line 45
Class
- ILTListBuilder
- Provides a list controller for opigno_ilt entity.
Namespace
Drupal\opigno_iltCode
public function getDefaultOperations(EntityInterface $entity) {
$operations = parent::getDefaultOperations($entity);
$operations['score'] = [
'title' => $this
->t('Score'),
'weight' => 10,
'url' => Url::fromRoute('opigno_ilt.score', [
'opigno_ilt' => $entity
->id(),
], [
'query' => [
'destination' => 'admin/content/ilt',
],
'absolute' => TRUE,
]),
];
return $operations;
}