LegalController.php in Legal 8
File
src/Controller/LegalController.php
View source
<?php
namespace Drupal\legal\Controller;
use Drupal\Core\Controller\ControllerBase;
class LegalController extends ControllerBase {
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']),
];
}
}