本文整理汇总了PHP中LabelUtil::getUncapitalizedRecordLabelByCount方法的典型用法代码示例。如果您正苦于以下问题:PHP LabelUtil::getUncapitalizedRecordLabelByCount方法的具体用法?PHP LabelUtil::getUncapitalizedRecordLabelByCount怎么用?PHP LabelUtil::getUncapitalizedRecordLabelByCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LabelUtil
的用法示例。
在下文中一共展示了LabelUtil::getUncapitalizedRecordLabelByCount方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetUncapitalizedRecordLabelByCount
public function testGetUncapitalizedRecordLabelByCount()
{
$content = LabelUtil::getUncapitalizedRecordLabelByCount(1);
$this->assertEquals($content, 'record');
$content = LabelUtil::getUncapitalizedRecordLabelByCount(4);
$this->assertEquals($content, 'records');
$content = LabelUtil::getUncapitalizedRecordLabelByCount(0);
$this->assertEquals($content, 'records');
}
示例2: getCompleteMessage
protected function getCompleteMessage()
{
$successfulCount = $this->callInsufficientPermissionSkipSavingUtilFunction('resolveSuccessfulCountAgainstSkipCount', array($this->totalRecordCount, $this->skipCount));
$content = $successfulCount . ' ' . LabelUtil::getUncapitalizedRecordLabelByCount($successfulCount) . ' ' . $this->getCompleteMessageSuffix() . '.';
if ($this->skipCount > 0) {
$content .= ZurmoHtml::tag('br') . $this->callInsufficientPermissionSkipSavingUtilFunction('getSkipCountMessageContentByModelClassName', array($this->skipCount, get_class($this->model)));
}
return $content;
}
示例3: getCompleteMessage
protected function getCompleteMessage()
{
$successfulCount = MassEditInsufficientPermissionSkipSavingUtil::resolveSuccessfulCountAgainstSkipCount($this->totalRecordCount, $this->skipCount);
$content = $successfulCount . " " . LabelUtil::getUncapitalizedRecordLabelByCount($successfulCount) . " " . Yii::t('Default', 'updated successfully.');
if ($this->skipCount > 0) {
$content .= '<br/>' . MassEditInsufficientPermissionSkipSavingUtil::getSkipCountMessageContentByModelClassName($this->skipCount, get_class($this->model));
}
return $content;
}
示例4: renderItemLabel
protected function renderItemLabel()
{
return LabelUtil::getUncapitalizedRecordLabelByCount($this->selectedRecordCount);
}
示例5: renderHighlightBox
protected function renderHighlightBox()
{
$message = '<strong>' . $this->selectedRecordCount . '</strong> ' . LabelUtil::getUncapitalizedRecordLabelByCount($this->selectedRecordCount) . ' ' . Yii::t('Default', 'selected for updating.');
return HtmlNotifyUtil::renderHighlightBoxByMessage($message);
}
示例6: processMassDelete
/**
* This method is called after a mass delete form is first submitted.
* It is called from the actionMassDelete.
* @see actionMassDelete in the module default controllers.
*/
protected function processMassDelete($pageSize, $activeAttributes, $selectedRecordCount, $pageViewClassName, $listModel, $title, $dataProvider = null, $redirectUrl = null)
{
// TODO: @Shoaibi/@Jason: Low: Deprecated
// trigger_error('Deprecated');
assert('$dataProvider == null || $dataProvider instanceof CDataProvider');
$modelClassName = get_class($listModel);
$selectedRecordCount = static::getSelectedRecordCountByResolvingSelectAllFromGet($dataProvider);
if (isset($_POST['selectedRecordCount'])) {
$this->doMassDelete(get_class($listModel), $modelClassName, $selectedRecordCount, $dataProvider, $_GET[$modelClassName . '_page'], $pageSize);
// Cancel diminish of save scoring
if ($selectedRecordCount > $pageSize) {
$view = new $pageViewClassName(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $this->makeMassDeleteProgressView($listModel, 1, $selectedRecordCount, 1, $pageSize, $title, null)));
echo $view->render();
Yii::app()->end(0, false);
} else {
$skipCount = MassDeleteInsufficientPermissionSkipSavingUtil::getCount($modelClassName);
$successfulCount = MassDeleteInsufficientPermissionSkipSavingUtil::resolveSuccessfulCountAgainstSkipCount($selectedRecordCount, $skipCount);
MassDeleteInsufficientPermissionSkipSavingUtil::clear($modelClassName);
$notificationContent = $successfulCount . ' ' . LabelUtil::getUncapitalizedRecordLabelByCount($successfulCount) . ' ' . Zurmo::t('Core', 'successfully deleted') . '.';
if ($skipCount > 0) {
$notificationContent .= ' ' . MassDeleteInsufficientPermissionSkipSavingUtil::getSkipCountMessageContentByModelClassName($skipCount, $modelClassName);
}
Yii::app()->user->setFlash('notification', $notificationContent);
if ($redirectUrl === null) {
$this->redirect(array('default/'));
} else {
$this->redirect($redirectUrl);
}
Yii::app()->end(0, false);
}
}
return $listModel;
}