本文整理汇总了PHP中rex_list::getUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP rex_list::getUrl方法的具体用法?PHP rex_list::getUrl怎么用?PHP rex_list::getUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rex_list
的用法示例。
在下文中一共展示了rex_list::getUrl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
if ($func == '') {
$list = new rex_list('
SELECT
`id`, `title`, `publishedAt`, `status`
FROM `' . rex_asd_news_config::getTable() . '`
WHERE `clang` = ' . $clang . '
ORDER BY CASE
WHEN `publishedAt` = "0000-00-00 00:00:00" THEN 1
ELSE 0
END DESC,
`publishedAt` DESC, `updatedAt` DESC');
$list->addParam('clang', $clang);
$list->addParam('subpage', $subpage);
$imgHeader = '
<a class="rex-i-element rex-i-generic-add" href="' . $list->getUrl(array('func' => 'add')) . '">
<span class="rex-i-element-text">add</span>
</a>';
$list->setColumnLabel('id', $imgHeader);
$list->setColumnLabel('title', $I18N->msg('asd_news_title'));
$list->setColumnLabel('publishedAt', $I18N->msg('asd_news_publishedAt'));
$list->removeColumn('status');
$list->addTableColumnGroup(array(40, '*', 120, 50, 50, 50, 50));
$list->setColumnParams('title', array('func' => 'edit', 'id' => '###id###'));
$list->setColumnFormat('publishedAt', 'custom', function ($params) use($list, $now, $clang, $I18N, $REX) {
$publishedAt = new DateTime($list->getValue('publishedAt'));
$value = $publishedAt->format('d.m.Y H:i');
if ($list->getValue('publishedAt') == '0000-00-00 00:00:00') {
return '';
}
return '<span>' . $value . '</span>';
示例2: dirname
//------------------------------> Parameter
if (!isset($prefix)) {
trigger_error('Fehler: Prefix nicht definiert!', E_USER_ERROR);
exit;
}
if (!isset($metaTable)) {
trigger_error('Fehler: metaTable nicht definiert!', E_USER_ERROR);
exit;
}
$Basedir = dirname(__FILE__);
$field_id = rex_request('field_id', 'int');
//------------------------------> Eintragsliste
if ($func == '') {
$list = new rex_list('SELECT field_id, name FROM ' . $REX['TABLE_PREFIX'] . '62_params WHERE `name` LIKE "' . $prefix . '%" ORDER BY prior');
$list->setCaption($I18N_META_INFOS->msg('field_list_caption'));
$imgHeader = '<a href="' . $list->getUrl(array('func' => 'add')) . '"><img src="media/metainfo_plus.gif" alt="add" title="add" /></a>';
$list->addColumn($imgHeader, '<img src="media/metainfo.gif" alt="field" title="field" />', 0, array('<th class="rex-icon">###VALUE###</th>', '<td class="rex-icon">###VALUE###</td>'));
$list->setColumnParams($imgHeader, array('func' => 'edit', 'field_id' => '###field_id###'));
$list->setColumnLabel('field_id', $I18N_META_INFOS->msg('field_label_id'));
$list->setColumnLayout('field_id', array('<th class="rex-icon">###VALUE###</th>', '<td class="rex-icon">###VALUE###</td>'));
$list->setColumnLabel('name', $I18N_META_INFOS->msg('field_label_name'));
$list->setColumnParams('name', array('func' => 'edit', 'field_id' => '###field_id###'));
$list->show();
} elseif ($func == 'edit' || $func == 'add') {
require_once $REX['INCLUDE_PATH'] . '/addons/metainfo/classes/class.rex_tableExpander.inc.php';
$form = new rex_a62_tableExpander($prefix, $metaTable, $REX['TABLE_PREFIX'] . '62_params', $I18N_META_INFOS->msg('field_fieldset'), 'field_id=' . $field_id);
if ($func == 'edit') {
$form->addParam('field_id', $field_id);
}
$form->show();
}