Route controller class for the tmgmt translator entity.
Expanded class hierarchy of TranslatorController
class TranslatorController extends ControllerBase {
/**
* Enables a Translator object.
*
* @param \Drupal\tmgmt\TranslatorInterface $tmgmt_translator
* The Translator object to enable.
*
* @return \Symfony\Component\HttpFoundation\RedirectResponse
* A redirect response to the tmgmt listing page.
*/
function enable(TranslatorInterface $tmgmt_translator) {
$tmgmt_translator
->enable()
->save();
return new RedirectResponse(url('admin/tmgmt/translators', array(
'absolute' => TRUE,
)));
}
/**
* Disables a Translator object.
*
* @param \Drupal\tmgmt\TranslatorInterface $tmgmt_translator
* The Translator object to disable.
*
* @return \Symfony\Component\HttpFoundation\RedirectResponse
* A redirect response to the tmgmt listing page.
*/
function disable(TranslatorInterface $tmgmt_translator) {
$tmgmt_translator
->disable()
->save();
return new RedirectResponse(url('admin/tmgmt/translators', array(
'absolute' => TRUE,
)));
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TranslatorController:: |
function | Disables a Translator object. | ||
TranslatorController:: |
function | Enables a Translator object. |