public function YamlFormMessageManager::build in YAML Form 8
Build message.
Return value
array A render array containing a message.
Overrides YamlFormMessageManagerInterface::build
1 call to YamlFormMessageManager::build()
- YamlFormMessageManager::display in src/
YamlFormMessageManager.php - Display message.
File
- src/
YamlFormMessageManager.php, line 156
Class
- YamlFormMessageManager
- Defines the form message (and login) manager.
Namespace
Drupal\yamlformCode
public function build($key) {
if ($message = $this
->get($key)) {
return [
'#markup' => $message,
'#allowed_tags' => Xss::getAdminTagList(),
];
}
else {
return [];
}
}