You are here

function _pagerer_list_presets in Pagerer 7

Get the list of pagerer presets.

Return value

array list of preset names ['preset'] => 'preset'

4 calls to _pagerer_list_presets()
PagererViewsPagerPlugin::options_form in plugins/pagerer.views.pager.inc
Provide the form for setting options.
pagerer_preset_name_validate in ./pagerer.admin.inc
Preset name validation.
pagerer_settings_form in ./pagerer.admin.inc
Main Pagerer settings admin form.
theme_pagerer_preset_list in ./pagerer.admin.inc
Render a table with the presets lists.

File

./pagerer.module, line 2066
Pagerer

Code

function _pagerer_list_presets() {
  $res = db_select('variable', 'v')
    ->fields('v')
    ->condition('name', 'pagerer.preset.%', 'LIKE')
    ->execute();
  $list = array();
  if ($res) {
    foreach ($res as $row) {
      $preset = drupal_substr($row->name, drupal_strlen('pagerer.preset.'));
      $list[$preset] = $preset;
    }
  }
  return $list;
}