public function FillPdfFormListBuilder::getDefaultOperations in FillPDF 5.0.x
Same name and namespace in other branches
- 8.4 src/FillPdfFormListBuilder.php \Drupal\fillpdf\FillPdfFormListBuilder::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/
FillPdfFormListBuilder.php, line 24
Class
- FillPdfFormListBuilder
- Provides a listing of FillPdf forms.
Namespace
Drupal\fillpdfCode
public function getDefaultOperations(EntityInterface $entity) {
$duplicate = [
'title' => t('Duplicate'),
'weight' => 10,
'url' => $this
->ensureDestination($entity
->toUrl('duplicate-form')),
];
$export = [
'title' => t('Export configuration'),
'weight' => 20,
'url' => $this
->ensureDestination($entity
->toUrl('export-form')),
];
$import = [
'title' => t('Import configuration'),
'weight' => 30,
'url' => $this
->ensureDestination($entity
->toUrl('import-form')),
];
$operations = parent::getDefaultOperations($entity) + [
'duplicate' => $duplicate,
'export' => $export,
'import' => $import,
];
return $operations;
}