本文整理汇总了PHP中CRM_Utils_System::getLinksUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Utils_System::getLinksUrl方法的具体用法?PHP CRM_Utils_System::getLinksUrl怎么用?PHP CRM_Utils_System::getLinksUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Utils_System
的用法示例。
在下文中一共展示了CRM_Utils_System::getLinksUrl方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: makeURL
/**
* Compose a new url string from the current url string
* Used by all the framework components, specifically,
* pager, sort and qfc
*
* @param string $urlVar the url variable being considered (i.e. crmPageID, crmSortID etc)
*
* @return string the url fragment
* @access public
*/
static function makeURL($urlVar, $includeReset = false, $includeForce = true)
{
$config = CRM_Core_Config::singleton();
if (!isset($_GET[$config->userFrameworkURLVar])) {
return '';
}
return self::url($_GET[$config->userFrameworkURLVar], CRM_Utils_System::getLinksUrl($urlVar, $includeReset, $includeForce));
}
示例2: makeURL
/**
* Compose a new URL string from the current URL string.
*
* Used by all the framework components, specifically,
* pager, sort and qfc
*
* @param string $urlVar
* The url variable being considered (i.e. crmPageID, crmSortID etc).
* @param bool $includeReset
* (optional) Whether to include the reset GET string (if present).
* @param bool $includeForce
* (optional) Whether to include the force GET string (if present).
* @param string $path
* (optional) The path to use for the new url.
* @param bool|string $absolute
* (optional) Whether to return an absolute URL.
*
* @return string
* The URL fragment.
*/
public static function makeURL($urlVar, $includeReset = FALSE, $includeForce = TRUE, $path = NULL, $absolute = FALSE)
{
if (empty($path)) {
$config = CRM_Core_Config::singleton();
$path = CRM_Utils_Array::value($config->userFrameworkURLVar, $_GET);
if (empty($path)) {
return '';
}
}
return self::url($path, CRM_Utils_System::getLinksUrl($urlVar, $includeReset, $includeForce), $absolute);
}
示例3: setTemplateValues
/**
* Set the post action values for the block.
*
* php is lame and u cannot call functions from static initializers
* hence this hack
*
* @param int $id
*
* @return void
*/
private static function setTemplateValues($id)
{
switch ($id) {
case self::CREATE_NEW:
self::setTemplateShortcutValues();
break;
case self::DASHBOARD:
self::setTemplateDashboardValues();
break;
case self::ADD:
$defaultLocation = CRM_Core_BAO_LocationType::getDefault();
$defaultPrimaryLocationId = $defaultLocation->id;
$values = array('postURL' => CRM_Utils_System::url('civicrm/contact/add', 'reset=1&ct=Individual'), 'primaryLocationType' => $defaultPrimaryLocationId);
foreach (CRM_Contact_BAO_Contact::$_greetingTypes as $greeting) {
$values[$greeting . '_id'] = CRM_Contact_BAO_Contact_Utils::defaultGreeting('Individual', $greeting);
}
self::setProperty(self::ADD, 'templateValues', $values);
break;
case self::LANGSWITCH:
// gives the currentPath without trailing empty lcMessages to be completed
$values = array('queryString' => CRM_Utils_System::getLinksUrl('lcMessages', TRUE, FALSE, FALSE));
self::setProperty(self::LANGSWITCH, 'templateValues', $values);
break;
case self::FULLTEXT_SEARCH:
$urlArray = array('fullTextSearchID' => CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', 'CRM_Contact_Form_Search_Custom_FullText', 'value', 'name'));
self::setProperty(self::FULLTEXT_SEARCH, 'templateValues', $urlArray);
break;
case self::RECENTLY_VIEWED:
$recent = CRM_Utils_Recent::get();
self::setProperty(self::RECENTLY_VIEWED, 'templateValues', array('recentlyViewed' => $recent));
break;
case self::EVENT:
self::setTemplateEventValues();
break;
}
}
示例4: getCurrentLocation
/**
* @return string
*/
public function getCurrentLocation()
{
$config = CRM_Core_Config::singleton();
$path = CRM_Utils_Array::value($config->userFrameworkURLVar, $_GET);
return CRM_Utils_System::url($path, CRM_Utils_System::getLinksUrl(self::PAGE_ID, FALSE, TRUE), FALSE, NULL, FALSE) . $this->getCurrentPageID();
}
示例5: makeURL
/**
* Compose a new url string from the current url string
* Used by all the framework components, specifically,
* pager, sort and qfc
*
* @param string $urlVar the url variable being considered (i.e. crmPageID, crmSortID etc)
*
* @return string the url fragment
* @access public
*/
function makeURL($urlVar)
{
$config =& CRM_Core_Config::singleton();
return CRM_Utils_System::url($_GET[$config->userFrameworkURLVar], CRM_Utils_System::getLinksUrl($urlVar));
}