本文整理汇总了PHP中Y::declOfNum方法的典型用法代码示例。如果您正苦于以下问题:PHP Y::declOfNum方法的具体用法?PHP Y::declOfNum怎么用?PHP Y::declOfNum使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Y
的用法示例。
在下文中一共展示了Y::declOfNum方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run()
{
$model = Holes::model()->count(array('condition' => 'PREMODERATED=1'));
$all = $model;
$model = Holes::model()->count(array('condition' => 'PREMODERATED=1 AND STATE="inprogress"'));
$ingibdd = $model;
$model = Holes::model()->count(array('condition' => 'PREMODERATED=1 AND STATE="fixed"'));
$fixed = $model;
$this->registerCoreScripts();
$this->render($this->itemview, array('all' => Y::declOfNum($all, array('дефект', 'дефекта', 'дефектов')), 'ingibdd' => $ingibdd, 'fixed' => $fixed));
}
示例2: array
echo CHtml::encode($data->type->name);
?>
">
<span class="status_span state_<?php
echo $data->STATE;
?>
">•</span>
<span class="status_text"><?php
echo CHtml::encode($data->StateName);
?>
</span>
<?php
if ($data->WAIT_DAYS) {
?>
<span class="status_days"><i>ждать <?php
echo Y::declOfNum($data->WAIT_DAYS, array('день', 'дня', 'дней'));
?>
</i></span>
<?php
}
?>
<?php
if ($data->PAST_DAYS) {
?>
<span class="status_days"><i>просрочено <?php
//echo Y::declOfNum($data->PAST_DAYS, array('день', 'дня', 'дней'));
?>
</i></span>
<?php
}
?>
示例3: array
?>
<div class="cc">
<?php
echo CHtml::link('Пометить как отправленное ' . Y::declOfNum(count($list->notSentHoles), array('яму', 'ямы', 'ям')), array('sentMany', 'holes' => implode(',', CHtml::listData($list->notSentHoles, 'ID', 'ID'))), array('class' => ''));
?>
<br/>
</div>
<?php
}
?>
<?php
if ($list->sentedHoles) {
?>
<div class="rc" style="padding: 24px 15px;">
<?php
echo CHtml::link('Загрузить ответ на ' . Y::declOfNum(count($list->sentedHoles), array('яму', 'ямы', 'ям')), array('gibddreply', 'holes' => implode(',', CHtml::listData($list->sentedHoles, 'ID', 'ID'))), array('class' => ''));
?>
<br/>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
<!-- CLOSE HEAD CONTAINER -->
</div>
<!-- CLOSE HEAD -->
示例4: array
echo $model->name;
} else {
echo $model->username;
}
?>
</h1>
<div class="www">
<a target="_blank" href="http://"></a>
</div>
</div>
<div class="counter">
<?php
echo Y::declOfNum($model->holes_cnt, array('дефект', 'дефекта', 'дефектов'));
?>
/ <?php
echo Y::declOfNum($model->holes_fixed_cnt, array('отремонтирован', 'отремонтировано', 'отремонтировано'));
?>
</div>
</div>
</div>
</div>
</div>
<div class="mainCols">
<div class="lCol">
<?php
if ($model->hole_area && $model->getParam('showMyarea')) {
?>
<h2>Зона наблюдения</h2>
<?php
$this->widget('application.widgets.userAreaMap.userAreaMapWidget', array('data' => array('area' => $model->hole_area)));
示例5: array
echo Yii::t('template', 'COUNT_IN_COLLECTION');
?>
</span>
<div class="collection-counter-wrap">
<div class="collection-item">
<div class="wrap">
<span class="inside">
<?php
for ($i = 0, $count = strlen($all); $i < $count; $i++) {
echo CHtml::tag('span', array(), substr($all, $i, 1));
}
?>
</span>
</div>
<?php
echo preg_replace('/[0-9 ]/ui', '', Y::declOfNum($all, Yii::t('template', 'COUNT_DEFECTS')));
?>
</div>
<div class="collection-item">
<div class="wrap">
<span class="inside">
<?php
for ($i = 0, $count = strlen($ingibdd); $i < $count; $i++) {
echo CHtml::tag('span', array(), substr($ingibdd, $i, 1));
}
?>
</span>
</div>
<?php
echo Yii::t('template', 'COUNT_GAI');
?>
示例6: foreach
<div class="holes_select_list_box">
<?php
if ($gibdds) {
?>
<h2>Выбраны:</h2>
<?php
foreach ($gibdds as $gibdd) {
echo $gibdd->gibdd_name;
?>
<br/>
<?php
//echo CHtml::link('Напечатать заявление на '.Y::declOfNum(count($gibdd->holes),Array('яму','ямы','ям')), Array('requestForm','id'=>$gibdd->id,'type'=>'gibdd','holes'=>implode(',',CHtml::listData($gibdd->holes,'ID','ID'))), Array('class'=>'show_form'));
echo CHtml::link('Сохранить список ' . Y::declOfNum(count($gibdd->holes), array('яму', 'ямы', 'ям')), array('/profile/saveHoles2Selected', 'id' => $gibdd->id, 'holes' => implode(',', CHtml::listData($gibdd->holes, 'ID', 'ID'))), array('class' => 'save_selected'));
?>
<br/><br/>
<?php
}
?>
<br/><?php
echo CHtml::link('Очистить список', '#', array('class' => 'clear_selected'));
?>
<br/><br/>
<?php
}
if ($user->selected_holes_lists) {
?>
<h2>Сохраненные:</h2>
<?php
foreach ($user->selected_holes_lists as $list) {
?>
<?php
示例7: array
</div>
<div class="rCol">
<div id="head_user_info">
<div class="counter">
<span class="counter-text"><?php
Yii::t('holes', 'all_defects');
?>
</span><span class="count-class"><?php
echo Y::declOfNum($this->user->usermodel->holes_cnt, array('', '', ''));
?>
</span>
<span class="counter-text"><?php
Yii::t('holes', 'fix_defects');
?>
</span><span class="count-class"><?php
echo Y::declOfNum($this->user->usermodel->holes_fixed_cnt, array('', '', ''));
?>
</span>
</div>
<div class="photo">
<?php
if ($this->user->userModel->relProfile && $this->user->userModel->relProfile->avatar) {
echo CHtml::image($this->user->userModel->relProfile->avatar_folder . '/' . $this->user->userModel->relProfile->avatar, 'Аватар', array('width' => '63', 'height' => '63'));
}
?>
</div>
<div class="info">
<h1><?php
echo $this->user->fullName;
示例8: if
</span>
</p>
<div class="control">
<div class="progress">
<? if($hole->WAIT_DAYS): ?>
<div class="lc">
<div class="wait">
<p>Ждать, когда отремонтируют</p>
<p class="days"><?php echo Y::declOfNum($hole->WAIT_DAYS, array('день', 'дня', 'дней')); ?></p>
</div>
</div>
<? elseif($hole->PAST_DAYS): ?>
<div class="lc">
<div class="wait">
<p>Просрочено</p>
<p class="days"><?php echo Y::declOfNum($hole->PAST_DAYS, array('день', 'дня', 'дней')); ?></p>
</div>
</div>
<? endif; ?>
<? if(!Yii::app()->user->isGuest): ?>
<? if(Yii::app()->user->IsAdmin) : ?>
<p>
<font class="errortext">
Вы обладаете административными полномочиями
<br/>
</font>
</p>
<? endif; ?>
<?php if(!$hole->PREMODERATED) : ?>
<p>
示例9: array
} else {
echo $model->username;
}
?>
</h1>
<div class="www">
<a target="_blank" href="http://"></a>
</div>
</div>
<div class="counter">
<span class="counter-text">Всего дефектов</span><span class="count-class"><?php
echo Y::declOfNum($model->holes_cnt, array('', '', ''));
?>
</span>
<span class="counter-text">Исправленно дефектов</span><span class="count-class"><?php
echo Y::declOfNum($model->holes_fixed_cnt, array('', '', ''));
?>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="mainCols">
<div class="lCol">
<?php
if ($model->hole_area && $model->getParam('showMyarea')) {
?>
<h2>Зона наблюдения</h2>
<?php
$this->widget('application.widgets.userAreaMap.userAreaMapWidget', array('data' => array('area' => $model->hole_area)));