function TestController::variable
Returns a render array depending on some passed in value.
Parameters
string $plugin_id: The plugin ID.
Return value
array The render array
1 string reference to 'TestController::variable'
- content_negotiation_test.routing.yml in core/
modules/ system/ tests/ modules/ content_negotiation_test/ content_negotiation_test.routing.yml - core/modules/system/tests/modules/content_negotiation_test/content_negotiation_test.routing.yml
File
-
core/
modules/ system/ tests/ modules/ content_negotiation_test/ src/ Controller/ TestController.php, line 65
Class
- TestController
- Test controller for content negotiation tests.
Namespace
Drupal\content_negotiation_test\ControllerCode
public function variable($plugin_id) {
return [
'#markup' => $plugin_id,
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.