public function ModalListBuilder::getDefaultOperations in Modal 8.3
Same name and namespace in other branches
- 8.2 src/Entity/Controller/ModalListBuilder.php \Drupal\modal_page\Entity\Controller\ModalListBuilder::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/
Entity/ Controller/ ModalListBuilder.php, line 65
Class
- ModalListBuilder
- Provides a list controller for Modal entity.
Namespace
Drupal\modal_page\Entity\ControllerCode
public function getDefaultOperations(EntityInterface $modal_page) {
$operations = parent::getDefaultOperations($modal_page);
$operations['published'] = [
'title' => $this
->t('Toggle Published'),
'weight' => 15,
'url' => $this
->ensureDestination($modal_page
->toUrl('published-form')),
];
return $operations;
}