本文整理汇总了PHP中Fisharebest\Webtrees\Date::calendarNames方法的典型用法代码示例。如果您正苦于以下问题:PHP Date::calendarNames方法的具体用法?PHP Date::calendarNames怎么用?PHP Date::calendarNames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fisharebest\Webtrees\Date
的用法示例。
在下文中一共展示了Date::calendarNames方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCalendarOptionList
/**
* Function getCalendarOptionList
*
* @return string
*/
public function getCalendarOptionList()
{
$html = '';
foreach (Date::calendarNames() as $calendar => $name) {
$selected = $this->calendar === $calendar ? 'selected' : '';
$html .= sprintf('<option dir="auto" value="%s" %s>%s</option>', $calendar, $selected, $name);
}
return $html;
}
示例2: urlencode
&filterof=<?php
echo $filterof;
?>
&filtersx=<?php
echo $filtersx;
?>
&view=year">
<?php
echo I18N::translate('View year');
?>
</a>
</td>
<td class="topbottombar width50">
<?php
$n = 0;
foreach (Date::calendarNames() as $newcal => $cal_name) {
$tmp = $cal_date->convertToCalendar($newcal);
if ($tmp->inValidRange()) {
if ($n++) {
echo ' | ';
}
if (get_class($tmp) === get_class($cal_date)) {
echo '<span class="error">', $cal_name, '</span>';
} else {
$newcalesc = urlencode($tmp->format('%@'));
$tmpmonth = $tmp->format('%O');
echo '<a href="?cal=', $newcalesc, '&day=', $tmp->d, '&month=', $tmpmonth, '&year=', $tmp->y, '&filterev=', $filterev, '&filterof=', $filterof, '&filtersx=', $filtersx, '&view=', $view, '">', $cal_name, '</a>';
}
}
}
?>
示例3: PageController
*/
namespace Fisharebest\Webtrees;
/**
* Defined in session.php
*
* @global Tree $WT_TREE
*/
global $WT_TREE;
use Fisharebest\Webtrees\Controller\PageController;
use Fisharebest\Webtrees\Functions\FunctionsEdit;
define('WT_SCRIPT_NAME', 'admin_trees_config.php');
require './includes/session.php';
$controller = new PageController();
$controller->restrictAccess(Auth::isManager($WT_TREE));
$calendars = array('none' => I18N::translate('No calendar conversion')) + Date::calendarNames();
$french_calendar_start = new Date('22 SEP 1792');
$french_calendar_end = new Date('31 DEC 1805');
$gregorian_calendar_start = new Date('15 OCT 1582');
$hide_show = array(0 => I18N::translate('hide'), 1 => I18N::translate('show'));
$surname_list_styles = array('style1' => I18N::translate('list'), 'style2' => I18N::translate('table'), 'style3' => I18N::translate('tag cloud'));
$layouts = array(0 => I18N::translate('Portrait'), 1 => I18N::translate('Landscape'));
$one_to_nine = array();
for ($n = 1; $n <= 9; ++$n) {
$one_to_nine[$n] = I18N::number($n);
}
$formats = array('' => I18N::translate('none'), 'markdown' => I18N::translate('markdown'));
$source_types = array(0 => I18N::translate('none'), 1 => I18N::translate('facts'), 2 => I18N::translate('records'));
$no_yes = array(0 => I18N::translate('no'), 1 => I18N::translate('yes'));
$PRIVACY_CONSTANTS = array('none' => I18N::translate('Show to visitors'), 'privacy' => I18N::translate('Show to members'), 'confidential' => I18N::translate('Show to managers'), 'hidden' => I18N::translate('Hide from everyone'));
$privacy = array(Auth::PRIV_PRIVATE => I18N::translate('Show to visitors'), Auth::PRIV_USER => I18N::translate('Show to members'), Auth::PRIV_NONE => I18N::translate('Show to managers'), Auth::PRIV_HIDE => I18N::translate('Hide from everyone'));