You are here

pwa.pages.inc in Progressive Web App 7.2

Same filename and directory in other branches
  1. 7 pwa.pages.inc

File

pwa.pages.inc
View source
<?php

/**
 * @file
 */

/**
 * Default page when for when the user has no connection.
 *
 * @todo template like maintenance page?
 *
 * @return array
 */
function pwa_offline_page() {
  return [
    '#theme' => 'html_tag',
    '#tag' => 'h1',
    '#value' => 'You are offline.',
    '#attributes' => [
      'data-drupal-pwa-offline' => TRUE,
    ],
  ];
}

/**
 * Route to confirm for SW that module is still active.
 *
 * @return array
 */
function pwa_module_active() {
  return [
    'pwa' => 'ok',
  ];
}

Functions

Namesort descending Description
pwa_module_active Route to confirm for SW that module is still active.
pwa_offline_page Default page when for when the user has no connection.