You are here

public function WebformContentCreatorListBuilder::getDefaultOperations in Webform Content Creator 3.x

Same name and namespace in other branches
  1. 8 src/Controller/WebformContentCreatorListBuilder.php \Drupal\webform_content_creator\Controller\WebformContentCreatorListBuilder::getDefaultOperations()
  2. 2.x src/Controller/WebformContentCreatorListBuilder.php \Drupal\webform_content_creator\Controller\WebformContentCreatorListBuilder::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/Controller/WebformContentCreatorListBuilder.php, line 57

Class

WebformContentCreatorListBuilder
Provides a list of Webform Content Creator entities.

Namespace

Drupal\webform_content_creator\Controller

Code

public function getDefaultOperations(EntityInterface $entity, $type = 'edit') {
  $operations = parent::getDefaultOperations($entity);
  $operations['manage_fields'] = [
    self::TITLE => $this
      ->t('Manage fields'),
    'weight' => 0,
    'url' => Url::fromRoute('entity.webform_content_creator.manage_fields_form', [
      'webform_content_creator' => $entity
        ->id(),
    ]),
  ];
  return $operations;
}