public function LegalController::legalPageAction in Legal 8
Same name and namespace in other branches
- 2.0.x src/Controller/LegalController.php \Drupal\legal\Controller\LegalController::legalPageAction()
Page callback.
Return value
array Render array of terms and conditions.
1 string reference to 'LegalController::legalPageAction'
File
- src/
Controller/ LegalController.php, line 20
Class
- LegalController
- Class LegalController.
Namespace
Drupal\legal\ControllerCode
public function legalPageAction() {
$language = $this
->languageManager()
->getCurrentLanguage();
$conditions = legal_get_conditions($language
->getId());
return [
'#type' => 'markup',
'#markup' => check_markup($conditions['conditions'], $conditions['format'], $conditions['language']),
];
}