Returns an array of supported actions for the current entity form.
Overrides EntityFormController::actions
protected function actions(array $form, array &$form_state) {
// If we are displaying the delete confirmation skip the regular actions.
if (empty($form_state['confirm_delete'])) {
$actions = parent::actions($form, $form_state);
array_unshift($actions['delete']['#submit'], array(
$this,
'submit',
));
// Add the language configuration submit handler. This is needed because
// the submit button has custom submit handlers.
if (module_exists('language')) {
array_unshift($actions['submit']['#submit'], 'language_configuration_element_submit');
array_unshift($actions['submit']['#submit'], array(
$this,
'languageConfigurationSubmit',
));
}
// We cannot leverage the regular submit handler definition because we
// have button-specific ones here. Hence we need to explicitly set it for
// the submit action, otherwise it would be ignored.
if (module_exists('translation_entity')) {
array_unshift($actions['submit']['#submit'], 'translation_entity_language_configuration_element_submit');
}
return $actions;
}
else {
return array();
}
}