本文整理汇总了PHP中Legacy_Utils::renderUri方法的典型用法代码示例。如果您正苦于以下问题:PHP Legacy_Utils::renderUri方法的具体用法?PHP Legacy_Utils::renderUri怎么用?PHP Legacy_Utils::renderUri使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Legacy_Utils
的用法示例。
在下文中一共展示了Legacy_Utils::renderUri方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getBreadcrumbs
public static function getBreadcrumbs($breadcrumbs, $dirname, Legroup_GroupObject $group = null)
{
//module name set
$modHandler = xoops_gethandler('module');
$module = $modHandler->getByDirname($dirname);
$breadcrumbs[] = array('name' => $module->name(), 'url' => Legacy_Utils::renderUri($dirname, 'group'));
if (isset($group) && !$group->isNew()) {
$breadcrumbs[] = array('name' => $group->getShow('title'), 'url' => Legacy_Utils::renderUri($dirname, 'group', $group->getShow('group_id')));
}
}
示例2: smarty_function_xoops_cooluri
function smarty_function_xoops_cooluri($params, &$smarty)
{
if(! $params['dirname']) return;
$dirname = $params['dirname'];
$dataname = isset($params['dataname']) ? $params['dataname'] : null;
$dataId = isset($params['data_id']) ? $params['data_id'] : 0;
$action = isset($params['action']) ? $params['action'] : null;
$query = isset($params['query']) ? $params['query'] : null;
echo htmlspecialchars(Legacy_Utils::renderUri($dirname, $dataname, $dataId, $action, $query), ENT_QUOTES);
}
示例3: getBreadcrumbs
public static function getBreadcrumbs(&$breadcrumbs, $dirname, $category = null)
{
//module name set
$modHandler = xoops_gethandler('module');
$module = $modHandler->getByDirname($dirname);
$breadcrumbs[] = array('name' => $module->getVar('name'), 'url' => Legacy_Utils::renderUri($dirname));
//catetgory name set
if ($category instanceof Lecat_CatObject) {
$category->loadCatPath();
//parent page set
$idArr = array_reverse($category->mCatPath['cat_id']);
$titleArr = array_reverse($category->mCatPath['title']);
foreach (array_keys($idArr) as $key) {
$breadcrumbs[] = array('name' => $titleArr[$key], 'url' => Legacy_Utils::renderUri($dirname, null, $idArr[$key]));
}
$breadcrumbs[] = array('name' => $category->getShow('title'), 'url' => Legacy_Utils::renderUri($dirname, null, $category->getShow('cat_id')));
}
}
示例4: executeViewCancel
/**
* executeViewCancel
*
* @param XCube_RenderTarget &$render
*
* @return void
**/
public function executeViewCancel(&$render)
{
$url = $this->_isSubtable() ? Legacy_Utils::renderUri($this->mRoot->mContext->mModuleConfig['maintable'], 'page', $this->mObject->getShow('maintable_id')) : $this->_getNextUri('page', 'list');
$this->mRoot->mController->executeForward($url);
}
示例5: getBreadcrumbs
public static function getBreadcrumbs($breadcrumbs, $dirname, $page = null)
{
$categoryDirname = null;
//module name set
$modHandler = xoops_gethandler('module');
$module = $modHandler->getByDirname($dirname);
$breadcrumbs[] = array('name' => $module->getVar('name'), 'url' => Legacy_Utils::renderUri($dirname));
//catetgory name set
if ($page instanceof Xcck_PageObject) {
if ($page->get('category_id') > 0) {
$accessController = Xcck_Utils::getAccessController($dirname);
if ($accessController instanceof XoopsModule) {
$categoryDirname = $accessController->getVar('dirname');
}
switch ($accessController->getInfo('role')) {
case 'cat':
$catArr = array();
XCube_DelegateUtils::call('Legacy_Category.' . $categoryDirname . '.GetCatPath', new XCube_Ref($catArr), $categoryDirname, $page->get('category_id'), 'ASC');
foreach (array_keys($catArr['title']) as $key) {
$breadcrumbs[] = array('name' => $catArr['title'][$key], 'url' => Legacy_Utils::renderUri($dirname, 'page', 0, null, 'category_id=' . $catArr['cat_id'][$key]));
}
break;
case 'group':
$groupName = null;
XCube_DelegateUtils::call('Legacy_Category.' . $categoryDirname . '.GetTitle', new XCube_Ref($groupName), $categoryDirname, $page->get('category_id'));
$breadcrumbs[] = array('name' => $groupName, 'url' => Legacy_Utils::renderUri($dirname, 'page', 0, null, 'category_id=' . $page->get('category_id')));
break;
default:
}
}
//parent page set
$pageIdArr = array_reverse($page->mPath['page_id']);
$titleArr = array_reverse($page->mPath['title']);
foreach (array_keys($pageIdArr) as $key) {
$breadcrumbs[] = array('name' => $titleArr[$key], 'url' => Legacy_Utils::renderUri($dirname, null, $pageIdArr[$key]));
}
}
}
示例6: executeViewSuccess
/**
* executeViewSuccess
*
* @param XCube_RenderTarget &$render
*
* @return void
**/
public function executeViewSuccess(&$render)
{
$url = null;
XCube_DelegateUtils::call('Module.' . $this->mAsset->mDirname . '.Event.GetForwardUri.Success', new XCube_Ref($url), $this->mObject);
if (isset($url)) {
$this->mRoot->mController->executeForward($url);
}
if ($this->mRoot->mContext->mModuleConfig['forward_action'] === 'list') {
$this->mRoot->mController->executeForward(Legacy_Utils::renderUri($this->mAsset->mDirname));
}
if ($this->mRoot->mContext->mModuleConfig['forward_action'] === 'search') {
$this->mRoot->mController->executeForward(Legacy_Utils::renderUri($this->mAsset->mDirname, 'page', 0, 'search'));
} else {
$this->mRoot->mController->executeForward($this->_getNextUri('page'));
}
}
示例7: _getBaseUrl
/**
* _getBaseUrl
*
* @param void
*
* @return string
**/
protected function _getBaseUrl()
{
return Legacy_Utils::renderUri($this->mAsset->mDirname, 'member');
}
示例8: _saveWorkflow
/**
* save workflow
*
* @param XoopsSimpleObject $obj
*
* @return void
*/
protected function _saveWorkflow($obj)
{
XCube_DelegateUtils::call('Legacy_Workflow.AddItem', $obj->getShow($this->mPrimary), $obj->getDirname(), $this->getDataname(), $obj->get($obj->getPrimary()), Legacy_Utils::renderUri($obj->getDirname(), $this->getDataname(), $obj->get($this->mPrimary)));
}
示例9: _getIncSearchScript
/**
* _getIncSearchScript
*
* @param void
*
* @return string
**/
protected function _getIncSearchScript()
{
$searchList = Playermap_Utils::getSearchList('group');
$base = rtrim(Legacy_Utils::renderUri($this->mAsset->mDirname, 'group', 1), 1);
$idString = implode(',', $searchList['id']);
$titleString = '"' . implode('","', $searchList['title']) . '"';
$searchString = '"' . implode('","', $searchList['search']) . '"';
return sprintf('var arr={"title":[%s],"search":[%s],"id":[%s]};$("#incsearch").add_incsearch_on($("#searchList"),arr,"%s");', $titleString, $searchString, $idString, $base);
}
示例10: executeViewCancel
/**
* executeViewCancel
*
* @param XCube_RenderTarget &$render
*
* @return void
**/
public function executeViewCancel(&$render)
{
$this->mRoot->mController->executeForward(Legacy_Utils::renderUri($this->mAsset->mDirname, 'cat', $this->mCatId));
}
示例11: _getBaseUrl
/**
* _getBaseUrl
*
* @param void
*
* @return string
**/
protected function _getBaseUrl()
{
return Legacy_Utils::renderUri($this->mAsset->mDirname, $this->_getConst('DATANAME'));
}
示例12: getClientFeed
/**
* getClientFeed Legacy_ActivityClient.{dirname}.GetClientFeed
*
* @param mixed &$list
* string[] $list['title'] entry's title
* string[] $list['link'] link to entry
* string[] $list['id'] entry's id(=permalink to entry)
* int[] $list['updated'] unixtime
* int[] $list['published'] unixtime
* string[] $list['author']
* string[] $list['content']
* @param string $dirname client module's dirname
* @param string $dataname client module's dataname(tablename)
* @param int $dataId client module's primary key
*
* @return void
*/
public static function getClientFeed(&$list, $dirname, $dataname, $dataId)
{
$handler = Legacy_Utils::getModuleHandler($dataname, $dirname);
if (!$handler) {
return;
}
//setup client module info
$obj = $handler->get($dataId);
$list['title'] = $obj->get('title');
$list['link'] = Legacy_Utils::renderUri($dirname, $dataname, $dataId);
$list['id'] = Legacy_Utils::renderUri($dirname, $dataname, $dataId);
$list['published'] = $obj->get('posttime');
$list['updated'] = $obj->get('updatetime');
$list['author'] = Legacy_Utils::getUserName($obj->get('uid'));
$list['content'] = null;
}
示例13: showField
public function showField($obj, $key, $option = 0)
{
if ($option == Xcck_ActionType::NONE || $option == Xcck_ActionType::VIEW) {
$fileManager = new Xcck_File($obj);
if ($fileManager->existFile($key) === true) {
$unit = $this->getOption($obj->mDef[$key], 'unit');
$value = sprintf('<a href="%s">%s (%s%s)</a>', Legacy_Utils::renderUri($obj->getDirname(), $obj->getDataname(), $obj->getShow('page_id'), 'download', 'field_name=' . $key), $obj->getShow($key), $fileManager->getFileSize($key, $unit), $unit);
}
} elseif ($option == Xcck_ActionType::EDIT) {
$value = $obj->get($key);
}
return $value;
}
示例14: executeViewSuccess
/**
* executeViewSuccess
*
* @param XCube_RenderTarget &$render
*
* @return void
**/
public function executeViewSuccess(&$render)
{
if ($this->mObject->isNew()) {
$this->mRoot->mController->executeForward(Legacy_Utils::renderUri($this->mAsset->mDirname, 'entry', 0, 'edit', 'log_id=' . $this->mObject->get('log_id')));
} else {
$this->mRoot->mController->executeForward($this->_getNextUri('log'));
}
}
示例15: executeViewCancel
/**
* executeViewCancel
*
* @param XCube_RenderTarget &$render
*
* @return void
**/
public function executeViewCancel(&$render)
{
$this->mRoot->mController->executeForward(Legacy_Utils::renderUri($this->mAsset->mDirname, 'group', $this->mObject->getShow('group_id')));
}