public function EntityTranslationNodeHandler::entityFormSubmit in Entity Translation 7
Overrides EntityTranslationDefaultHandler::entityFormSubmit
See also
EntityTranslationDefaultHandler::entityFormSubmit()
File
- includes/
translation.handler.node.inc, line 86 - Node translation handler for the entity translation module.
Class
- EntityTranslationNodeHandler
- Node translation handler.
Code
public function entityFormSubmit($form, &$form_state) {
if (!isset($form_state['values']['translation'])) {
// Always publish the original values when we have no translations.
$form_state['values']['translation'] = array(
'status' => TRUE,
);
}
$values =& $form_state['values']['translation'];
if (!$this
->isTranslationForm()) {
// Inherit entity authoring information for the original values.
if (isset($form_state['values']['name'])) {
$values['name'] = $form_state['values']['name'];
}
if (!empty($form_state['values']['date'])) {
$values['created'] = $form_state['values']['date'];
}
}
parent::entityFormSubmit($form, $form_state);
}