You are here

function QuizFeedbackTypeListBuilder::getDefaultOperations in Quiz 8.6

Same name and namespace in other branches
  1. 8.5 src/Config/Entity/QuizFeedbackTypeListBuilder.php \Drupal\quiz\Config\Entity\QuizFeedbackTypeListBuilder::getDefaultOperations()
  2. 6.x src/Config/Entity/QuizFeedbackTypeListBuilder.php \Drupal\quiz\Config\Entity\QuizFeedbackTypeListBuilder::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 ConfigEntityListBuilder::getDefaultOperations

File

src/Config/Entity/QuizFeedbackTypeListBuilder.php, line 40

Class

QuizFeedbackTypeListBuilder
Defines the list builder for quiz question types.

Namespace

Drupal\quiz\Config\Entity

Code

function getDefaultOperations(EntityInterface $entity) {
  $operations = parent::getDefaultOperations($entity);
  $operations['conditions'] = [
    'title' => $this
      ->t('Conditions'),
    'url' => Url::fromRoute('entity.quiz_feedback_type.conditions', [
      'quiz_feedback_type' => $entity
        ->id(),
    ]),
    'weight' => 50,
  ];
  return $operations;
}