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


PHP LabelUtil::getUncapitalizedRecordLabelByCount方法代码示例

本文整理汇总了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');
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:9,代码来源:LabelUtilTest.php

示例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;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:9,代码来源:MassProgressView.php

示例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;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:9,代码来源:MassEditProgressView.php

示例4: renderItemLabel

 protected function renderItemLabel()
 {
     return LabelUtil::getUncapitalizedRecordLabelByCount($this->selectedRecordCount);
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:4,代码来源:MassEditView.php

示例5: renderHighlightBox

 protected function renderHighlightBox()
 {
     $message = '<strong>' . $this->selectedRecordCount . '</strong>&#160;' . LabelUtil::getUncapitalizedRecordLabelByCount($this->selectedRecordCount) . ' ' . Yii::t('Default', 'selected for updating.');
     return HtmlNotifyUtil::renderHighlightBoxByMessage($message);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:5,代码来源:MassEditView.php

示例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;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:38,代码来源:ZurmoBaseController.php


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