You are here

public function ServletConfig::getRelocateFromHosts in N1ED - Visual editor as CKEditor plugin with Bootstrap support 8.2

Gets a list of hosts a relocation is allowed from.

Overrides ConfigInterface::getRelocateFromHosts

File

src/Flmngr/FileUploaderServer/servlet/ServletConfig.php, line 189

Class

ServletConfig
Implementation of ConfigInterface interface. Returnes values with validationing them.

Namespace

Drupal\n1ed\Flmngr\FileUploaderServer\servlet

Code

public function getRelocateFromHosts() {
  $hostsStr = $this
    ->getParameterStr("relocateFromHosts", "");
  $hostsFound = explode(",", $hostsStr);
  $hosts = [];
  for ($i = count($hostsFound) - 1; $i >= 0; $i--) {
    $host = strtolower(trim($hostsFound[$i]));
    if (strlen($host) > 0) {
      $hosts[] = $host;
    }
  }
  return $hosts;
}