public function EntityTranslationNodeHandler::entityForm in Entity Translation 7
Convert the translation update status fieldset into a vartical tab.
Overrides EntityTranslationDefaultHandler::entityForm
File
- includes/
translation.handler.node.inc, line 44 - Node translation handler for the entity translation module.
Class
- EntityTranslationNodeHandler
- Node translation handler.
Code
public function entityForm(&$form, &$form_state) {
parent::entityForm($form, $form_state);
// Move the translation fieldset to a vertical tab.
if (isset($form['translation'])) {
$form['translation'] += array(
'#group' => 'additional_settings',
'#weight' => 100,
'#attached' => array(
'js' => array(
drupal_get_path('module', 'entity_translation') . '/entity_translation.node-form.js',
),
),
);
if (!$this
->isTranslationForm()) {
$form['translation']['name']['#access'] = FALSE;
$form['translation']['created']['#access'] = FALSE;
}
}
// Path aliases natively support multilingual values.
if (isset($form['path'])) {
$form['path']['#multilingual'] = TRUE;
}
}