You are here

function simplemeta_meta_list in Simple Meta 7

Same name and namespace in other branches
  1. 6.2 simplemeta.admin.inc \simplemeta_meta_list()

Menu callback; show list of saved SimpleMeta configurations.

Return value

string themed output

1 string reference to 'simplemeta_meta_list'
simplemeta_menu in ./simplemeta.module
Implements hook_menu().

File

./simplemeta.admin.inc, line 35
Administration

Code

function simplemeta_meta_list() {
  $query = db_select('simplemeta', 's')
    ->extend('PagerDefault')
    ->fields('s')
    ->orderBy('s.sid', 'DESC')
    ->limit(20);
  $result = $query
    ->execute();
  $items = array();
  while ($meta = $result
    ->fetchObject()) {
    $meta->data = unserialize($meta->data);
    $items[] = $meta;
  }
  return theme('simplemeta_meta_list', array(
    'items' => $items,
  )) . theme('pager');
}