finder_admin_list
| Versions | |
|---|---|
| 6.x-1.x – 7.x-1.x | finder_admin_list() |
Admin finder list page.
Code
includes/
<?php
function finder_admin_list() {
$output = array();
$finders = finder_load_multiple();
if (empty($finders)) {
$output[]['#markup'] = t('There are currently no finders configured.');
}
else {
foreach ((array) $finders as $finder) {
// allow modules to change the finder here
finder_invoke_finderapi($finder, 'finder_admin_list');
if (!isset($finder->settings['programmatic']) || !$finder->settings['programmatic']) {
$rows = array();
$rows[] = array(
array(
'data' => '<strong>' . check_plain($finder->title) . '</strong>',
'class' => 'finder-title',
),
array(
'data' => l(t('Edit'), 'admin/structure/finder/' . $finder->finder_id . '/edit')
. ' | ' . l(t('Delete'), 'admin/structure/finder/' . $finder->finder_id . '/delete'),
'class' => 'finder-ops',
'align' => 'right',
),
);
$rows[] = array(
array(
'data' => '
<div class="type">' . t('Type') . '<span class="finder-colon">:</span> <span>' . t($finder->base_handler['#title']) . '</span></div>
<div class="path">' . t('Path') . '<span class="finder-colon">:</span> <span>' . l($finder->path, $finder->path) . '</span></div>
',
'class' => 'finder-summary',
),
array(
'data' => '<div class="description">' . check_markup($finder->description) . '</div>',
'class' => 'finder-desc description',
),
);
$output[] = array(
'#theme' => 'table',
'#rows' => $rows,
'#attributes' => array('class' => 'finder-table finder-' . $finder->finder_id),
);
}
}
}
$output[] = drupal_get_form('finder_admin_add_form');
return $output;
}
?>
