function TranslatorController::disable

Disables a Translator object.

Parameters

\Drupal\tmgmt\TranslatorInterface $tmgmt_translator: The Translator object to disable.

Return value

\Symfony\Component\HttpFoundation\RedirectResponse A redirect response to the tmgmt listing page.

File

src/Controller/TranslatorController.php, line 37

Class

TranslatorController
Route controller class for the tmgmt translator entity.

Namespace

Drupal\tmgmt\Controller

Code

function disable(TranslatorInterface $tmgmt_translator) {
  $tmgmt_translator
    ->disable()
    ->save();
  return new RedirectResponse(url('admin/tmgmt/translators', array(
    'absolute' => TRUE,
  )));
}