You are here

protected function CourseListBuilder::getDefaultOperations in Course 8.2

Same name and namespace in other branches
  1. 8.3 src/Config/Entity/CourseListBuilder.php \Drupal\course\Config\Entity\CourseListBuilder::getDefaultOperations()
  2. 3.x src/Config/Entity/CourseListBuilder.php \Drupal\course\Config\Entity\CourseListBuilder::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/Config/Entity/CourseListBuilder.php, line 31

Class

CourseListBuilder
Defines the list builder for course entities.

Namespace

Drupal\course\Config\Entity

Code

protected function getDefaultOperations(EntityInterface $entity) {
  $operations = parent::getDefaultOperations($entity);
  $operations['outline'] = [
    'title' => $this
      ->t('Objects'),
    'weight' => 101,
    'url' => \Drupal\Core\Url::fromRoute('course.outline', [
      'course' => $entity
        ->id(),
    ]),
  ];
  return $operations;
}