当前位置: 首页>>代码示例>>PHP>>正文


PHP Date::calendarNames方法代码示例

本文整理汇总了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;
 }
开发者ID:tronsmit,项目名称:webtrees,代码行数:14,代码来源:LifespanController.php

示例2: urlencode

&amp;filterof=<?php 
echo $filterof;
?>
&amp;filtersx=<?php 
echo $filtersx;
?>
&amp;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, '&amp;day=', $tmp->d, '&amp;month=', $tmpmonth, '&amp;year=', $tmp->y, '&amp;filterev=', $filterev, '&amp;filterof=', $filterof, '&amp;filtersx=', $filtersx, '&amp;view=', $view, '">', $cal_name, '</a>';
        }
    }
}
?>
开发者ID:josefpavlik,项目名称:webtrees,代码行数:31,代码来源:calendar.php

示例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'));
开发者ID:tronsmit,项目名称:webtrees,代码行数:31,代码来源:admin_trees_config.php


注:本文中的Fisharebest\Webtrees\Date::calendarNames方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。