RenderArrayNonHtmlSubscriberTestController.php
Same filename in other branches
- 9 core/modules/system/tests/modules/render_array_non_html_subscriber_test/src/RenderArrayNonHtmlSubscriberTestController.php
- 8.9.x core/modules/system/tests/modules/render_array_non_html_subscriber_test/src/RenderArrayNonHtmlSubscriberTestController.php
- 10 core/modules/system/tests/modules/render_array_non_html_subscriber_test/src/RenderArrayNonHtmlSubscriberTestController.php
Namespace
Drupal\render_array_non_html_subscriber_testFile
-
core/
modules/ system/ tests/ modules/ render_array_non_html_subscriber_test/ src/ RenderArrayNonHtmlSubscriberTestController.php
View source
<?php
declare (strict_types=1);
namespace Drupal\render_array_non_html_subscriber_test;
use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\HttpFoundation\Response;
class RenderArrayNonHtmlSubscriberTestController extends ControllerBase {
/**
* @return string
*/
public function rawString() {
return new Response((string) $this->t('Raw controller response.'));
}
/**
* @return array
*/
public function renderArray() {
return [
'#type' => 'html_tag',
'#tag' => 'p',
'#value' => $this->t('Controller response successfully rendered.'),
];
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
RenderArrayNonHtmlSubscriberTestController |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.