You are here

public function HiddenLanguageManager::encodeArray in Hidden Language 2.x

Returns json encode array.

Parameters

string $config: The name of the form element.

Return value

array The states array.

File

src/HiddenLanguageManager.php, line 131

Class

HiddenLanguageManager
Class HiddenLanguageManager.

Namespace

Drupal\hidden_language

Code

public function encodeArray(string $config = NULL) {
  $array = explode(",", str_replace(" ", "", $config));
  $array = json_encode($array);
  return $array;
}