You are here

public function BlazyAdminBase::getCacheOptions in Blazy 7

Same name and namespace in other branches
  1. 8.2 src/Form/BlazyAdminBase.php \Drupal\blazy\Form\BlazyAdminBase::getCacheOptions()
  2. 8 src/Form/BlazyAdminBase.php \Drupal\blazy\Form\BlazyAdminBase::getCacheOptions()

Returns time in interval for select options.

1 call to BlazyAdminBase::getCacheOptions()
BlazyAdminExtended::closingForm in src/Form/BlazyAdminExtended.php
Returns shared ending form elements across field formatter and Views.

File

src/Form/BlazyAdminBase.php, line 645

Class

BlazyAdminBase
A base for blazy admin integration to have re-usable methods in one place.

Namespace

Drupal\blazy\Form

Code

public function getCacheOptions() {
  $period = [
    0,
    60,
    180,
    300,
    600,
    900,
    1800,
    2700,
    3600,
    10800,
    21600,
    32400,
    43200,
    86400,
  ];
  $period = drupal_map_assoc($period, 'format_interval');
  $period[0] = '<' . t('No caching') . '>';
  return $period + [
    CACHE_TEMPORARY => t('Persistent'),
  ];
}