You are here

public function Fz152PrivacyPolicyPage::content in FZ152 8

Builds a policy page.

Return value

array Renderable array.

1 string reference to 'Fz152PrivacyPolicyPage::content'
fz152.routing.yml in ./fz152.routing.yml
fz152.routing.yml

File

src/Controller/Fz152PrivacyPolicyPage.php, line 19

Class

Fz152PrivacyPolicyPage
Privacy policy page controller.

Namespace

Drupal\fz152\Controller

Code

public function content() {
  $config = $this
    ->config('fz152.privacy_policy_page');

  // Build page content.
  $text = $config
    ->get('text');
  $format = isset($text['format']) ? $text['format'] : filter_default_format();
  $build['content'] = [
    '#type' => 'processed_text',
    '#text' => isset($text['value']) ? $text['value'] : '',
    '#format' => $format,
  ];
  CacheableMetadata::createFromRenderArray($build)
    ->addCacheableDependency($config)
    ->applyTo($build);
  return $build;
}