You are here

public static function LdapAuthenticationConfiguration::arrayToLines in Lightweight Directory Access Protocol (LDAP) 8.3

Helper function to convert array to serialized lines.

Parameters

array $array: List of items.

Return value

string Serialized content.

1 call to LdapAuthenticationConfiguration::arrayToLines()
LdapAuthenticationAdminForm::buildForm in ldap_authentication/src/Form/LdapAuthenticationAdminForm.php
Form constructor.

File

ldap_authentication/src/Helper/LdapAuthenticationConfiguration.php, line 86

Class

LdapAuthenticationConfiguration
Configuration helper class for LDAP authentication.

Namespace

Drupal\ldap_authentication\Helper

Code

public static function arrayToLines(array $array) {
  $lines = "";
  if (is_array($array)) {
    $lines = implode("\n", $array);
  }
  elseif (is_array(@unserialize($array))) {
    $lines = implode("\n", unserialize($array));
  }
  return $lines;
}