Returns an array of supported actions for the current entity form.
Overrides EntityFormController::actions
protected function actions(array $form, array &$form_state) {
$actions = parent::actions($form, $form_state);
// Disable delete of new and built-in roles.
$actions['delete']['#access'] = !$this->entity
->isNew() && !in_array($this->entity
->id(), array(
DRUPAL_ANONYMOUS_RID,
DRUPAL_AUTHENTICATED_RID,
));
return $actions;
}