Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php namespace Drupal\config_test; use Drupal\Core\Controller\ControllerBase; use Drupa..

Decoded Output download

<?php

namespace Drupal\config_test;

use Drupal\Core\Controller\ControllerBase;
use Drupal\config_test\Entity\ConfigTest;
use Symfony\Component\HttpFoundation\RedirectResponse;

/**
 * Route controller class for the config_test module.
 */
class ConfigTestController extends ControllerBase {

  /**
   * Route title callback.
   *
   * @param \Drupal\config_test\Entity\ConfigTest $config_test
   *   The ConfigTest object.
   *
   * @return string
   *   The title for the ConfigTest edit form.
   */
  public function editTitle(ConfigTest $config_test) {
    return $this->t('Edit %label', ['%label' => $config_test->label()]);
  }

  /**
   * Enables a ConfigTest object.
   *
   * @param \Drupal\config_test\ConfigTest $config_test
   *   The ConfigTest object to enable.
   *
   * @return \Symfony\Component\HttpFoundation\RedirectResponse
   *   A redirect response to the config_test listing page.
   */
  public function enable(ConfigTest $config_test) {
    $config_test->enable()->save();
    return new RedirectResponse($config_test->url('collection', ['absolute' => TRUE]));
  }

  /**
   * Disables a ConfigTest object.
   *
   * @param \Drupal\config_test\ConfigTest $config_test
   *   The ConfigTest object to disable.
   *
   * @return \Symfony\Component\HttpFoundation\RedirectResponse
   *   A redirect response to the config_test listing page.
   */
  public function disable(ConfigTest $config_test) {
    $config_test->disable()->save();
    return new RedirectResponse($config_test->url('collection', ['absolute' => TRUE]));
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Drupal\config_test;

use Drupal\Core\Controller\ControllerBase;
use Drupal\config_test\Entity\ConfigTest;
use Symfony\Component\HttpFoundation\RedirectResponse;

/**
 * Route controller class for the config_test module.
 */
class ConfigTestController extends ControllerBase {

  /**
   * Route title callback.
   *
   * @param \Drupal\config_test\Entity\ConfigTest $config_test
   *   The ConfigTest object.
   *
   * @return string
   *   The title for the ConfigTest edit form.
   */
  public function editTitle(ConfigTest $config_test) {
    return $this->t('Edit %label', ['%label' => $config_test->label()]);
  }

  /**
   * Enables a ConfigTest object.
   *
   * @param \Drupal\config_test\ConfigTest $config_test
   *   The ConfigTest object to enable.
   *
   * @return \Symfony\Component\HttpFoundation\RedirectResponse
   *   A redirect response to the config_test listing page.
   */
  public function enable(ConfigTest $config_test) {
    $config_test->enable()->save();
    return new RedirectResponse($config_test->url('collection', ['absolute' => TRUE]));
  }

  /**
   * Disables a ConfigTest object.
   *
   * @param \Drupal\config_test\ConfigTest $config_test
   *   The ConfigTest object to disable.
   *
   * @return \Symfony\Component\HttpFoundation\RedirectResponse
   *   A redirect response to the config_test listing page.
   */
  public function disable(ConfigTest $config_test) {
    $config_test->disable()->save();
    return new RedirectResponse($config_test->url('collection', ['absolute' => TRUE]));
  }

}

Function Calls

None

Variables

None

Stats

MD5 db0d1812dd43b257b5d0505ef268829f
Eval Count 0
Decode Time 70 ms