You are here

protected function ContentLinksForm::loadUrls in General Data Protection Regulation 8

Same name and namespace in other branches
  1. 8.2 src/Form/ContentLinksForm.php \Drupal\gdpr\Form\ContentLinksForm::loadUrls()
  2. 3.0.x src/Form/ContentLinksForm.php \Drupal\gdpr\Form\ContentLinksForm::loadUrls()

Load the stored URLs as displayable strings.

Return value

array The loaded URLs.

1 call to ContentLinksForm::loadUrls()
ContentLinksForm::buildForm in src/Form/ContentLinksForm.php
Form constructor.

File

src/Form/ContentLinksForm.php, line 149

Class

ContentLinksForm
Class ContentLinksForm.

Namespace

Drupal\gdpr\Form

Code

protected function loadUrls() {
  $config = $this
    ->config(static::GDPR_CONTENT_CONF_KEY)
    ->get('links');
  if (NULL === $config || !\is_array($config)) {
    $config = [];
  }
  foreach ($config as $langCode => $links) {
    foreach ($links as $key => $link) {
      $config[$langCode][$key] = static::getUriAsDisplayableString($link);
    }
  }
  return $config;
}