Implements \Drupal\Core\Entity\EntityListController::getOperations().
Overrides ConfigEntityListController::getOperations
public function getOperations(EntityInterface $view) {
$definition = parent::getOperations($view);
$uri = $view
->uri();
$definition['clone'] = array(
'title' => t('Clone'),
'href' => $uri['path'] . '/clone',
'options' => $uri['options'],
'weight' => 15,
);
// Add AJAX functionality to enable/disable operations.
foreach (array(
'enable',
'disable',
) as $op) {
if (isset($definition[$op])) {
$definition[$op]['ajax'] = TRUE;
}
}
return $definition;
}