本文整理汇总了PHP中Results::getRecords方法的典型用法代码示例。如果您正苦于以下问题:PHP Results::getRecords方法的具体用法?PHP Results::getRecords怎么用?PHP Results::getRecords使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Results
的用法示例。
在下文中一共展示了Results::getRecords方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionRecords
public function actionRecords()
{
$type = $this->sGet('type', 'current');
$region = $this->sGet('region', 'China');
$event = $this->sGet('event', '333');
if (!in_array($type, array('current', 'history'))) {
$type = 'current';
}
if (!array_key_exists($event, Events::getNormalEvents())) {
$event = '333';
}
if ($type !== 'history') {
$event = '';
}
if (!Region::isValidRegion($region)) {
$region = 'China';
}
$records = Results::getRecords($type, $region, $event);
$this->title = 'Official Records';
$pageTitle = array('Official Records', Yii::t('Region', $region));
if ($type === 'history') {
$pageTitle[] = Yii::t('event', Events::getFullEventName($event));
}
$pageTitle[] = Yii::t('Results', ucfirst($type));
$this->pageTitle = $pageTitle;
$this->description = Yii::t('statistics', 'Regional records are displayed on the page, based on the official WCA records.');
$this->setWeiboShareDefaultText('世界魔方协会(WCA)所有官方项目的纪录展示');
$this->render('records', array('records' => $records, 'type' => $type, 'region' => $region, 'event' => $event));
}