public function WebformContentCreatorListBuilder::getDefaultOperations in Webform Content Creator 2.x
Same name and namespace in other branches
- 8 src/Controller/WebformContentCreatorListBuilder.php \Drupal\webform_content_creator\Controller\WebformContentCreatorListBuilder::getDefaultOperations()
- 3.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 64
Class
- WebformContentCreatorListBuilder
- Provides a list of Webform Content Creator entities.
Namespace
Drupal\webform_content_creator\ControllerCode
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;
}