本文整理汇总了PHP中JemHelper::icalAddEvent方法的典型用法代码示例。如果您正苦于以下问题:PHP JemHelper::icalAddEvent方法的具体用法?PHP JemHelper::icalAddEvent怎么用?PHP JemHelper::icalAddEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JemHelper
的用法示例。
在下文中一共展示了JemHelper::icalAddEvent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
* Creates the output for the Venue view
*/
function display($tpl = null)
{
$settings = JemHelper::config();
$settings2 = JemHelper::globalattribs();
$app = JFactory::getApplication();
$jinput = JFactory::getApplication()->input;
if ($settings2->get('global_show_ical_icon', '0') == 1) {
// Get data from the model
$model = $this->getModel();
$model->setLimit($settings->ical_max_items);
$model->setLimitstart(0);
$rows = $model->getItems();
$venueid = $jinput->getInt('id');
// initiate new CALENDAR
$vcal = JemHelper::getCalendarTool();
// $vcal->setProperty('unique_id', 'category'.$catid.'@'.$mainframe->getCfg('sitename'));
$vcal->setConfig("filename", "venue" . $venueid . ".ics");
foreach ($rows as $row) {
JemHelper::icalAddEvent($vcal, $row, $rows);
}
// generate and redirect output to user browser
$vcal->returnCalendar();
} else {
return;
}
}
示例2: display
/**
* Creates the output for the event view
*/
function display($tpl = null)
{
$settings = JemHelper::globalattribs();
// check iCal global setting
if ($settings->get('global_show_ical_icon','0')==1) {
// Get data from the model
$row = $this->get('Item');
if (empty($row)) {
return;
}
$row->categories = $this->get('Categories');
$row->id = $row->did;
$row->slug = $row->alias ? ($row->id.':'.$row->alias) : $row->id;
$params = $row->params;
// check individual iCal Event setting
if ($params->get('event_show_ical_icon',1)) {
// initiate new CALENDAR
$vcal = JemHelper::getCalendarTool();
$vcal->setConfig( "filename", "event".$row->did.".ics" );
JemHelper::icalAddEvent($vcal, $row);
// generate and redirect output to user browser
$vcal->returnCalendar();
} else {
return;
}
} else {
return;
}
}