本文整理汇总了PHP中Events::getFullEventName方法的典型用法代码示例。如果您正苦于以下问题:PHP Events::getFullEventName方法的具体用法?PHP Events::getFullEventName怎么用?PHP Events::getFullEventName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Events
的用法示例。
在下文中一共展示了Events::getFullEventName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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));
}
示例2: foreach
echo $competition->secondStageFee($competition->entry_fee);
?>
</td>
<?php
}
?>
</tr>
<?php
foreach ($competition->events as $key => $value) {
?>
<?php
if ($value['round'] > 0) {
?>
<tr>
<td><?php
echo Yii::t('event', Events::getFullEventName($key));
?>
</td>
<td> +<i class="fa fa-rmb"></i><?php
echo $value['fee'];
?>
</td>
<?php
if ($competition->hasSecondStage) {
?>
<td> +<i class="fa fa-rmb"></i><?php
echo $competition->secondStageFee($value['fee'], $competition->second_stage_all);
?>
</td>
<?php
}
示例3: makeRecords
private function makeRecords($records, $isNR = false)
{
$rec = array('en' => array(), 'zh' => array());
foreach ($records as $type => $recs) {
foreach ($recs as $result) {
$eventName = Events::getFullEventName($result->eventId);
$temp = $this->makePerson($result, true, $type);
$enRec = sprintf('%s %s %s (%s)', $temp->link, $eventName, $temp->score, $type);
$zhRec = sprintf('%s的%s纪录(%s),创造者%s', Yii::t('event', $eventName), $type === 'average' ? '平均' : '单次', $temp->score_zh, $temp->link_zh);
if ($isNR) {
$rec['en'][$result->personCountryId][] = $enRec;
$rec['zh'][$result->personCountryId][] = $zhRec;
} else {
$rec['en'][] = $enRec;
$rec['zh'][] = $zhRec;
}
}
}
if (!$isNR) {
$rec['en'] = implode(', ', $rec['en']);
$rec['zh'] = implode(';', $rec['zh']);
}
return $rec;
}
示例4: exportScoreCard
//.........这里部分代码省略.........
$sheet->mergeCells(sprintf('M%d:O%d', $i * $oneCardRow + 12, $i * $oneCardRow + 12));
$sheet->mergeCells(sprintf('P%d:R%d', $i * $oneCardRow + 12, $i * $oneCardRow + 12));
$sheet->mergeCells(sprintf('S%d:U%d', $i * $oneCardRow + 12, $i * $oneCardRow + 12));
$sheet->mergeCells(sprintf('V%d:X%d', $i * $oneCardRow + 12, $i * $oneCardRow + 12));
$sheet->mergeCells(sprintf('Y%d:AA%d', $i * $oneCardRow + 12, $i * $oneCardRow + 12));
$sheet->mergeCells(sprintf('AB%d:AD%d', $i * $oneCardRow + 12, $i * $oneCardRow + 12));
$sheet->mergeCells(sprintf('AE%d:AI%d', $i * $oneCardRow + 8, $i * $oneCardRow + 8));
$sheet->mergeCells(sprintf('AE%d:AI%d', $i * $oneCardRow + 9, $i * $oneCardRow + 9));
$sheet->mergeCells(sprintf('AE%d:AI%d', $i * $oneCardRow + 10, $i * $oneCardRow + 10));
$sheet->mergeCells(sprintf('AE%d:AI%d', $i * $oneCardRow + 11, $i * $oneCardRow + 11));
$sheet->mergeCells(sprintf('AE%d:AI%d', $i * $oneCardRow + 12, $i * $oneCardRow + 12));
//表尾
$sheet->mergeCells(sprintf('A%d:R%d', $i * $oneCardRow + 13, $i * $oneCardRow + 13));
$sheet->mergeCells(sprintf('S%d:AJ%d', $i * $oneCardRow + 13, $i * $oneCardRow + 13));
//调整各行高度及样式
for ($j = 1; $j <= $oneCardRow; $j++) {
$row = $i * $oneCardRow + $j;
$sheet->getRowDimension($row)->setRowHeight($rowHeights[$j]);
foreach ($xfIndexes[$j] as $col => $xfIndex) {
$sheet->getCell($col . $row)->setXfIndex($xfIndex);
}
}
//填写固定内容
foreach ($values as $value) {
$row = $i * $oneCardRow + $value['row'];
$cell = str_replace('{row}', $row, $value['template']);
$sheet->setCellValue($cell, $value['value']);
}
//比赛名字
$row = $i * $oneCardRow + 2;
$sheet->setCellValue("A{$row}", $title);
//项目、轮次、编号等
$row = $i * $oneCardRow + 3;
$eventName = Events::getFullEventName($event);
$eventName = sprintf('%s (%s)', Yii::t('event', $eventName), $eventName);
$sheet->setCellValue("C{$row}", $eventName);
$sheet->setCellValue("M{$row}", '1st');
$sheet->setCellValue("Q{$row}", $registration->number);
$sheet->setCellValue("U{$row}", $registration->user->wcaid);
$sheet->setCellValue("AB{$row}", $registration->user->getCompetitionName());
//8个图片
$row = $i * $oneCardRow + 7;
$col = 'G';
for ($j = 0; $j < 8; $j++) {
$drawing = new PHPExcelDrawing();
$drawing->setImageIndex($drawingCollection[$j]->getImageIndex());
$drawing->setWorksheet($sheet);
$drawing->setPath($drawingCollection[$j]->getPath(), false);
$drawing->setResizeProportional(false);
$drawing->setCoordinates("{$col}{$row}");
$drawing->setWidth($imageStyle['width'])->setHeight($imageStyle['height']);
$drawing->setOffsetX($imageStyle['offsetX'])->setOffsetY($imageStyle['offsetY']);
$col++;
$col++;
$col++;
}
$i++;
//400张一个表
if ($i == 400) {
$path = $tempPath . '/' . $competition->name . ".{$count}.xlsx";
$sheet->getRowDimension(4)->setRowHeight($rowHeights[4]);
$this->exportToExcel($scoreCard, $path);
//释放内存
$scoreCard->disconnectWorksheets();
unset($scoreCard, $sheet);
$count++;
示例5: array
<div class="panel-collapse collapse in">
<div class="portlet-body">
<?php
$form = $this->beginWidget('ActiveForm', array('htmlOptions' => array('class' => 'form-horizontal'), 'enableClientValidation' => true));
?>
<?php
foreach ($competition->events as $event => $data) {
?>
<?php
if ($data['round'] <= 0) {
continue;
}
?>
<div class="form-group">
<?php
echo $form->labelEx($model, 'name_zh', array('class' => 'col-lg-2 control-label', 'label' => Yii::t('event', Events::getFullEventName($event))));
?>
<div class="col-lg-10 checkbox">
<?php
for ($i = 0; $i < $data['round']; $i++) {
?>
<div class="export-round">
第<?php
echo $i + 1;
?>
轮:<?php
echo CHtml::dropDownList("event[{$event}][{$i}]", Events::getDefaultExportFormat($event), $exportFormsts, array());
?>
</div>
<?php
}
示例6: foreach
</div>
<?php
foreach (Results::getRankingTypes() as $_type) {
?>
<?php
echo CHtml::tag('button', array('type' => 'submit', 'name' => 'type', 'value' => $_type, 'class' => 'btn btn-' . ($type == $_type ? 'warning' : 'theme')), Yii::t('common', ucfirst($_type)));
?>
<?php
}
?>
<?php
$this->endWidget();
?>
<div class="event-title">
<?php
echo CHtml::tag('span', array('class' => 'event-icon event-icon-' . $event), Yii::t('event', Events::getFullEventName($event)));
?>
<?php
echo Yii::t('Region', $region);
?>
<?php
echo Yii::t('common', ucfirst($gender));
?>
<?php
echo Yii::t('common', ucfirst($type));
?>
</div>
<?php
示例7: getEventsColumns
public function getEventsColumns($headerText = false)
{
$region = 'Yii::t("Region", $data->user->country->getAttributeValue("name"))';
if (Yii::app()->language == 'zh_cn') {
$region .= '.$data->user->getRegionName($data->user->province). (in_array($data->user->province_id, array(215, 525, 567, 642)) ? "" : $data->user->getRegionName($data->user->city))';
}
$columns = array(array('headerHtmlOptions' => array('class' => 'battle-checkbox'), 'header' => Yii::t('common', 'Battle'), 'value' => 'Persons::getBattleCheckBox($data->user->getCompetitionName(), $data->user->wcaid)', 'type' => 'raw'), array('name' => 'number', 'header' => 'No.', 'value' => '$data->number'), array('name' => 'name', 'header' => Yii::t('Competition', 'Name'), 'headerHtmlOptions' => array('class' => 'header-username'), 'type' => 'raw', 'value' => '$data->user->getWcaLink()'), array('name' => 'gender', 'header' => Yii::t('common', 'Gender'), 'headerHtmlOptions' => array('class' => 'header-gender'), 'type' => 'raw', 'value' => '$data->user->getGenderText()'), array('name' => 'country_id', 'header' => Yii::t('common', 'Region'), 'headerHtmlOptions' => array('class' => 'header-region'), 'type' => 'raw', 'value' => $region));
if ($this->isMultiLocation()) {
$columns[] = array('name' => 'location_id', 'header' => Yii::t('common', 'Competition Site'), 'headerHtmlOptions' => array('class' => 'header-location'), 'type' => 'raw', 'value' => '$data->location->getFullAddress(false)');
}
foreach ($this->events as $event => $value) {
if ($value['round'] > 0) {
$columns[] = array('name' => (string) $event, 'header' => CHtml::tag('span', array('class' => 'event-icon event-icon-white event-icon-' . $event, 'title' => Yii::t('event', Events::getFullEventName($event))), $headerText ? $event : ''), 'headerHtmlOptions' => array('class' => 'header-event'), 'htmlOptions' => Yii::app()->controller->sGet('sort') === "{$event}" ? array('class' => 'hover') : array(), 'type' => 'raw', 'value' => "\$data->getEventsString('{$event}')");
}
}
return $columns;
}