本文整理汇总了PHP中CRM_Utils_System::docURL方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Utils_System::docURL方法的具体用法?PHP CRM_Utils_System::docURL怎么用?PHP CRM_Utils_System::docURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Utils_System
的用法示例。
在下文中一共展示了CRM_Utils_System::docURL方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: smarty_function_docURL
/**
* Given one of: ( page, title, text ) parameters, generates
* an HTML link to documentation.
*
* @param array $params the function params
* @param object $smarty reference to the smarty object
*
* @return string HTML code of a link to documentation
* @access public
*/
function smarty_function_docURL($params, &$smarty)
{
if (!isset($smarty)) {
return;
} else {
return CRM_Utils_System::docURL($params);
}
}
示例2: smarty_function_docURL
/**
* Given one of: ( page, title, text ) parameters, generates
* an HTML link to documentation.
*
* @param array $params the function params
* @param object $smarty reference to the smarty object
*
* @return string HTML code of a link to documentation
* @access public
*/
function smarty_function_docURL($params, &$smarty)
{
if (!isset($smarty)) {
return;
} else {
require_once 'CRM/Utils/System.php';
return CRM_Utils_System::docURL($params);
}
}
示例3: checkLastCron
/**
* Checks if cron has run in a reasonable amount of time
* @return array
*/
public function checkLastCron()
{
$messages = array();
$statusPreference = new CRM_Core_DAO_StatusPreference();
$statusPreference->domain_id = CRM_Core_Config::domainID();
$statusPreference->name = 'checkLastCron';
if ($statusPreference->find(TRUE) && !empty($statusPreference->check_info)) {
$lastCron = $statusPreference->check_info;
$msg = ts('Last cron run at %1.', array(1 => CRM_Utils_Date::customFormat(date('c', $lastCron))));
} else {
$lastCron = 0;
$msg = ts('No cron runs have been recorded.');
}
if ($lastCron > gmdate('U') - 3600) {
$messages[] = new CRM_Utils_Check_Message(__FUNCTION__, $msg, ts('Cron Running OK'), \Psr\Log\LogLevel::INFO, 'fa-clock-o');
} else {
$message = new CRM_Utils_Check_Message(__FUNCTION__, $msg, ts('Cron Not Running'), $lastCron > gmdate('U') - 86400 ? \Psr\Log\LogLevel::WARNING : \Psr\Log\LogLevel::ERROR, 'fa-clock-o');
$docUrl = 'target="_blank" href="' . CRM_Utils_System::docURL(array('resource' => 'wiki', 'page' => 'Managing Scheduled Jobs', 'URLonly' => TRUE)) . '""';
$message->addHelp(ts('Configuring cron on your server is necessary for running scheduled jobs such as sending mail and scheduled reminders.') . '<br />' . ts("Learn more in the <a %1>online documentation</a>.", array(1 => $docUrl)));
$messages[] = $message;
}
return $messages;
}