當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。