You are here

function pwa_str_to_list in Progressive Web App 8

Same name and namespace in other branches
  1. 2.x pwa.module \pwa_str_to_list()

Check data from input.

3 calls to pwa_str_to_list()
ConfigurationForm::validateForm in src/Form/ConfigurationForm.php
Form validation handler.
PWAController::pwa_serviceworker_file_data in src/Controller/PWAController.php
Replace the serviceworker file with variables from Drupal config.
pwa_update_8001 in ./pwa.install
Set the default offline_page variable.

File

./pwa.module, line 71
PWA hooks.

Code

function pwa_str_to_list($string) {
  $list = explode("\n", $string);
  $list = array_map('trim', $list);
  return array_filter($list, 'strlen');
}