public function SpambotUserSpamPageController::spambotUserSpam in Spambot 8
Returns a render-able array for a spam page.
Parameters
\Drupal\user\UserInterface $user: The user who can be reported.
Return value
array Return form.
1 string reference to 'SpambotUserSpamPageController::spambotUserSpam'
File
- src/
Controller/ SpambotUserSpamPageController.php, line 22
Class
- SpambotUserSpamPageController
- Returns a render-able array for a spam page.
Namespace
Drupal\spambot\ControllerCode
public function spambotUserSpam(UserInterface $user) {
$myForm = $this
->formBuilder()
->getForm('Drupal\\spambot\\Form\\SpambotUserspamForm', $user);
$renderer = \Drupal::service('renderer');
$myFormHtml = $renderer
->render($myForm);
return [
'#markup' => $myFormHtml,
];
}