path_breadcrumbs.admin.inc in Path Breadcrumbs 7
File
path_breadcrumbs.admin.inc
View source
<?php
function path_breadcrumbs_admin_page() {
$result = db_select('path_breadcrumbs', 'p')
->fields('p', array(
'path_id',
'name',
'path',
))
->execute();
$rows = array();
foreach ($result as $path) {
$row = array();
$row[] = $path->name;
$row[] = $path->path;
$row[] = theme('item_list', array(
'items' => array(
l(t('Edit'), 'admin/structure/path-breadcrumbs/edit/' . $path->path_id),
l(t('Delete'), 'admin/structure/path-breadcrumbs/delete/' . $path->path_id),
),
));
$rows[] = $row;
}
if ($rows) {
$headers = array(
t('Name'),
t('Path'),
t('Actions'),
);
$output = array(
'#theme' => 'table',
'#header' => $headers,
'#rows' => $rows,
);
}
else {
$output = t('There are no any path created yet.');
}
return $output;
}