Issue #2102443 by disasm, vijaycs85, rteijeiro: Remove drupal_set_title() in config_test() module controllers.
parent
13fe4f0674
commit
0d4acb30ff
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
namespace Drupal\config_test;
|
namespace Drupal\config_test;
|
||||||
|
|
||||||
|
use Drupal\Core\Controller\ControllerBase;
|
||||||
use Drupal\config_test\Entity\ConfigTest;
|
use Drupal\config_test\Entity\ConfigTest;
|
||||||
use Drupal\Component\Utility\String;
|
use Drupal\Component\Utility\String;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||||
|
@ -15,7 +16,7 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||||
/**
|
/**
|
||||||
* Route controller class for the config_test module.
|
* Route controller class for the config_test module.
|
||||||
*/
|
*/
|
||||||
class ConfigTestController {
|
class ConfigTestController extends ControllerBase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Presents the ConfigTest edit form.
|
* Presents the ConfigTest edit form.
|
||||||
|
@ -27,8 +28,9 @@ class ConfigTestController {
|
||||||
* A form array as expected by drupal_render().
|
* A form array as expected by drupal_render().
|
||||||
*/
|
*/
|
||||||
public function edit(ConfigTest $config_test) {
|
public function edit(ConfigTest $config_test) {
|
||||||
drupal_set_title(String::format('Edit %label', array('%label' => $config_test->label())), PASS_THROUGH);
|
$form = $this->entityManager()->getForm($config_test);
|
||||||
return \Drupal::entityManager()->getForm($config_test);
|
$form['#title'] = String::format('Edit %label', array('%label' => $config_test->label()));
|
||||||
|
return $form;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue