本文整理汇总了PHP中FRoute::getDefaultItemId方法的典型用法代码示例。如果您正苦于以下问题:PHP FRoute::getDefaultItemId方法的具体用法?PHP FRoute::getDefaultItemId怎么用?PHP FRoute::getDefaultItemId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FRoute
的用法示例。
在下文中一共展示了FRoute::getDefaultItemId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPasswordAndProfileLinks
function getPasswordAndProfileLinks()
{
$registerType = $this->params->get('register_type');
$this->forgotLink = '';
if ($registerType == "jomsocial" && file_exists(JPATH_BASE . '/components/com_community/libraries/core.php')) {
$jspath = JPATH_BASE . '/components/com_community';
include_once $jspath . '/libraries/core.php';
$this->registerLink = CRoute::_('index.php?option=com_community&view=register');
$user = JFactory::getUser();
$this->profileLink = CRoute::_('index.php?option=com_community&view=profile&userid=' . $user->id);
} else {
if ($registerType == 'easysocial' && file_exists(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php')) {
include_once JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php';
$this->registerLink = FRoute::registration();
if (method_exists('FRoute', 'getDefaultItemId')) {
$Itemid = '&Itemid=' . FRoute::getDefaultItemId('account');
} else {
$Itemid = '';
}
$this->forgotUsernameLink = JRoute::_('index.php?option=com_easysocial&view=account&layout=forgetUsername' . $Itemid);
$this->forgotPasswordLink = JRoute::_('index.php?option=com_easysocial&view=account&layout=forgetpassword' . $Itemid);
$this->profileLink = FRoute::profile();
} else {
if ($registerType == "communitybuilder" && file_exists(JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php')) {
$this->registerLink = JRoute::_("index.php?option=com_comprofiler&task=registers", false);
$this->forgotLink = JRoute::_("index.php?option=com_comprofiler&task=lostPassword");
$this->forgotUsernameLink = $this->forgotLink;
$this->forgotPasswordLink = $this->forgotLink;
$this->profileLink = JRoute::_("index.php?option=com_comprofiler", false);
} else {
if ($registerType == "virtuemart" && file_exists(JPATH_ADMINISTRATOR . '/components/com_virtuemart/version.php')) {
require_once JPATH_ADMINISTRATOR . '/components/com_virtuemart/version.php';
if (class_exists('vmVersion') && property_exists('vmVersion', 'RELEASE')) {
if (version_compare('1.99', vmVersion::$RELEASE)) {
// -1 if ver1, 1 if 2.0+
$this->registerLink = JRoute::_("index.php?option=com_virtuemart&view=user", false);
} else {
if (file_exists(JPATH_SITE . '/components/com_virtuemart/virtuemart_parser.php')) {
require_once JPATH_SITE . '/components/com_virtuemart/virtuemart_parser.php';
global $sess;
$this->registerLink = $sess->url(SECUREURL . 'index.php?option=com_virtuemart&page=shop.registration');
}
}
}
$this->profileLink = '';
} else {
if ($registerType == 'kunena' && JFolder::exists(JPATH_SITE . '/components/com_kunena')) {
$this->profileLink = JRoute::_('index.php?option=com_kunena&view=user', false);
$this->registerLink = JRoute::_('index.php?option=com_users&view=registration', false);
} else {
if ($registerType == 'custom') {
$this->profileLink = '';
$this->registerLink = $this->getLoginRedirect('registrationlink', false);
} else {
$this->profileLink = '';
$this->registerLink = JRoute::_('index.php?option=com_users&view=registration', false);
}
}
}
}
}
}
// common for J!, JomSocial, and Virtuemart
if (!$this->forgotUsernameLink) {
$this->forgotUsernameLink = JRoute::_('index.php?option=com_users&view=remind', false);
}
if (!$this->forgotPasswordLink) {
$this->forgotPasswordLink = JRoute::_('index.php?option=com_users&view=reset', false);
}
}