Defines the translation controller class for nodes.
Expanded class hierarchy of NodeTranslationController
class NodeTranslationController extends EntityTranslationController {
/**
* Overrides EntityTranslationController::getAccess().
*/
public function getAccess(EntityInterface $entity, $op) {
return node_access($op, $entity);
}
/**
* Overrides EntityTranslationController::entityFormAlter().
*/
public function entityFormAlter(array &$form, array &$form_state, EntityInterface $entity) {
parent::entityFormAlter($form, $form_state, $entity);
// Move the translation fieldset to a vertical tab.
if (isset($form['translation'])) {
$form['translation'] += array(
'#group' => 'additional_settings',
'#weight' => 100,
'#attributes' => array(
'class' => array(
'node-translation-options',
),
),
);
}
}
/**
* Overrides EntityTranslationController::entityFormTitle().
*/
protected function entityFormTitle(EntityInterface $entity) {
$type_name = node_get_type_label($entity);
return t('<em>Edit @type</em> @title', array(
'@type' => $type_name,
'@title' => $entity
->label(),
));
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityTranslationController:: |
protected | property | The entity info of the entity being translated. | |
EntityTranslationController:: |
protected | property | The type of the entity being translated. | |
EntityTranslationController:: |
protected | function | Adds a clue about the form element translatability. | |
EntityTranslationController:: |
function | Form submission handler for EntityTranslationController::entityFormAlter(). | ||
EntityTranslationController:: |
function | Form submission handler for EntityTranslationController::entityFormAlter(). | ||
EntityTranslationController:: |
public | function | Entity builder method. | |
EntityTranslationController:: |
public | function | Process callback: Determines which elements get clue in the form. | |
EntityTranslationController:: |
public | function | Form submission handler for EntityTranslationController::entityFormAlter(). | |
EntityTranslationController:: |
public | function |
Implements EntityTranslationControllerInterface::getBasePath(). Overrides EntityTranslationControllerInterface:: |
|
EntityTranslationController:: |
public | function |
Implements EntityTranslationControllerInterface::getEditPath(). Overrides EntityTranslationControllerInterface:: |
|
EntityTranslationController:: |
protected | function | Returns an instance of the given path. | |
EntityTranslationController:: |
public | function |
Implements EntityTranslationControllerInterface::getSourceLanguage(). Overrides EntityTranslationControllerInterface:: |
|
EntityTranslationController:: |
public | function |
Implements EntityTranslationControllerInterface::getTranslationAccess(). Overrides EntityTranslationControllerInterface:: |
|
EntityTranslationController:: |
public | function |
Implements EntityTranslationControllerInterface::getViewPath(). Overrides EntityTranslationControllerInterface:: |
|
EntityTranslationController:: |
public | function |
Implements EntityTranslationControllerInterface::removeTranslation(). Overrides EntityTranslationControllerInterface:: |
1 |
EntityTranslationController:: |
public | function |
Implements EntityTranslationControllerInterface::retranslate(). Overrides EntityTranslationControllerInterface:: |
|
EntityTranslationController:: |
public | function | Initializes an instance of the entity translation controller. | |
NodeTranslationController:: |
public | function |
Overrides EntityTranslationController::entityFormAlter(). Overrides EntityTranslationController:: |
|
NodeTranslationController:: |
protected | function |
Overrides EntityTranslationController::entityFormTitle(). Overrides EntityTranslationController:: |
|
NodeTranslationController:: |
public | function |
Overrides EntityTranslationController::getAccess(). Overrides EntityTranslationController:: |