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


PHP LabelUtil类代码示例

本文整理汇总了PHP中LabelUtil的典型用法代码示例。如果您正苦于以下问题:PHP LabelUtil类的具体用法?PHP LabelUtil怎么用?PHP LabelUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了LabelUtil类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getTranslatedRightsLabels

 public static function getTranslatedRightsLabels()
 {
     $params = LabelUtil::getTranslationParamsForAllModules();
     $labels = array();
     $labels[self::RIGHT_ACCESS_ACCOUNT_ACCOUNT_AFFILIATIONS] = Zurmo::t('MarketingModule', 'Access AccountsModuleSingularLabel to AccountsModuleSingularLabel  Affiliations Tab', $params);
     return $labels;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:7,代码来源:AccountAccountAffiliationsModule.php

示例2: renderContent

 protected function renderContent()
 {
     $content = '<div>';
     $content .= Zurmo::t('LeadsModule', 'LeadsModulePluralLabel and ContactsModulePluralLabel are the same records, ' . 'just in a different status. To create a LeadsModuleSingularLowerCaseLabel ' . 'field, create a ContactsModuleSingularLowerCaseLabel field, and then it ' . 'will be placeable in the LeadsModulePluralLowerCaseLabel layouts.', LabelUtil::getTranslationParamsForAllModules());
     $content .= '</div>' . "\n";
     return $content;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:7,代码来源:AttributesRedirectToContactsView.php

示例3: getData

 /**
  * Runs a query to get all the dates for meetings based on SearchAttributeData.  Then the data is processed
  * and @returns a data array of dates and quantity.  Quantity stands for how many meetings in a given date.
  * (non-PHPdoc)
  * @see CalendarDataProvider::getData()
  */
 public function getData()
 {
     $sql = $this->makeSqlQuery();
     $rows = ZurmoRedBean::getAll($sql);
     $data = array();
     foreach ($rows as $row) {
         $localTimeZoneAdjustedDate = DateTimeUtil::convertDbFormattedDateTimeToLocaleFormattedDisplay($row['startdatetime'], 'medium', null);
         if (isset($data[$localTimeZoneAdjustedDate])) {
             $data[$localTimeZoneAdjustedDate]['quantity'] = $data[$localTimeZoneAdjustedDate]['quantity'] + 1;
         } else {
             $data[$localTimeZoneAdjustedDate] = array('date' => $localTimeZoneAdjustedDate, 'quantity' => 1, 'dbDate' => $row['startdatetime']);
         }
     }
     foreach ($data as $key => $item) {
         if ($item['quantity'] == 1) {
             $label = Zurmo::t('MeetingsModule', '{quantity} MeetingsModuleSingularLabel', array_merge(LabelUtil::getTranslationParamsForAllModules(), array('{quantity}' => $item['quantity'])));
         } else {
             $label = Zurmo::t('MeetingsModule', '{quantity} MeetingsModulePluralLabel', array_merge(LabelUtil::getTranslationParamsForAllModules(), array('{quantity}' => $item['quantity'])));
         }
         $data[$key]['label'] = $label;
         if ($item['quantity'] > 5) {
             $quantityClassSuffix = 6;
         } else {
             $quantityClassSuffix = $item['quantity'];
         }
         $data[$key]['className'] = 'calendar-events-' . $quantityClassSuffix;
     }
     return $data;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:35,代码来源:MeetingsCalendarDataProvider.php

示例4: renderContent

 protected function renderContent()
 {
     $nextPageUrl = Yii::app()->createUrl($this->moduleId . '/' . $this->controllerId . '/checkSystem/');
     $content = '<div class="MetadataView">';
     $content .= '<table><tr><td>';
     $content .= Zurmo::t('InstallModule', 'Welcome to Zurmo. Before getting started, we need some information ' . 'on the database. You will need to know the following items before proceeding:', LabelUtil::getZurmoLabelParam());
     $content .= '<br/>';
     $content .= '<br/>';
     $content .= '<ul>';
     $content .= '<li>' . Zurmo::t('InstallModule', 'Database host') . '</li>';
     $content .= '<li>' . Zurmo::t('InstallModule', 'Database admin username') . '</li>';
     $content .= '<li>' . Zurmo::t('InstallModule', 'Database admin password') . '</li>';
     $content .= '<li>' . Zurmo::t('InstallModule', 'Database name') . '</li>';
     $content .= '<li>' . Zurmo::t('InstallModule', 'Database username') . '</li>';
     $content .= '<li>' . Zurmo::t('InstallModule', 'Database password') . '</li>';
     $content .= '<li>' . Zurmo::t('InstallModule', 'Memcache host') . '</li>';
     $content .= '<li>' . Zurmo::t('InstallModule', 'Memcache port number') . '</li>';
     $content .= '</ul>';
     $content .= Zurmo::t('InstallModule', 'In all likelihood, these items were supplied to you by your Web Host. ' . 'If you do not have this information, then you will need to contact ' . 'them before you can continue. If you\'re all ready...');
     $content .= '<br/><br/>';
     $content .= ZurmoHtml::link(ZurmoHtml::wrapLabel(Zurmo::t('InstallModule', 'Click to start')), $nextPageUrl, array('class' => 'default-btn'));
     $content .= '</td></tr></table>';
     $content .= '</div>';
     return $content;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:25,代码来源:InstallWelcomeView.php

示例5: getSkipCountMessageContentByModelClassName

 public static function getSkipCountMessageContentByModelClassName($skipCount, $modelClassName)
 {
     if ($skipCount > 0) {
         return $skipCount . ' ' . LabelUtil::getUncapitalizedModelLabelByCountAndModelClassName($skipCount, $modelClassName) . ' ' . Zurmo::t('ZurmoModule', 'skipped because you do not have sufficient permissions.');
     }
     throw new NotSupportedException();
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:7,代码来源:MassDeleteInsufficientPermissionSkipSavingUtil.php

示例6: sanitizeValueBySanitizerTypes

 /**
  * Given an array of sanitizer util types, a value, as well as several other parameters, run through each
  * sanitizer type on the value and process any sanitization messages or errors into the ImportSanitizeResultsUtil
  * provided.
  * @param array $sanitizerUtilTypes
  * @param string $modelClassName
  * @param string $attributeName
  * @param mixed $value
  * @param array $columnMappingData
  * @param ImportSanitizeResultsUtil $importSanitizeResultsUtil
  * @return mixed value
  */
 public static function sanitizeValueBySanitizerTypes($sanitizerUtilTypes, $modelClassName, $attributeName, $value, $columnName, $columnMappingData, ImportSanitizeResultsUtil $importSanitizeResultsUtil)
 {
     assert('is_array($sanitizerUtilTypes)');
     assert('is_string($modelClassName)');
     assert('is_string($attributeName) || $attributeName == null');
     assert('is_string($columnName)');
     assert('is_array($columnMappingData)');
     foreach ($sanitizerUtilTypes as $sanitizerUtilType) {
         try {
             $sanitizer = ImportSanitizerUtilFactory::make($sanitizerUtilType, $modelClassName, $attributeName, $columnName, $columnMappingData);
             if ($sanitizer->shouldSanitizeValue()) {
                 $value = $sanitizer->sanitizeValue($value);
             }
         } catch (InvalidValueToSanitizeException $e) {
             if ($e->getMessage() != null) {
                 if ($attributeName != null) {
                     $label = LabelUtil::makeModelAndAttributeNameCombinationLabel($modelClassName, $attributeName);
                 } else {
                     $label = $modelClassName::getModelLabelByTypeAndLanguage('Singular') . ' -';
                 }
                 $importSanitizeResultsUtil->addMessage($label . ' ' . $e->getMessage());
             }
             $value = null;
             if ($sanitizer::shouldNotSaveModelOnSanitizingValueFailure()) {
                 $importSanitizeResultsUtil->setModelShouldNotBeSaved();
             }
             break;
         }
     }
     return $value;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:43,代码来源:ImportSanitizerUtil.php

示例7: renderContent

 /**
  * @return bool|string
  */
 protected function renderContent()
 {
     $this->registerScripts();
     if ($this->cookieValue == self::HIDDEN_COOKIE_VALUE) {
         $style = "style=display:none;";
         // Not Coding Standard
     } else {
         $style = null;
     }
     $content = '<div id="' . self::PANEL_ID . '" ' . $style . '>';
     $content .= '<h1>' . Zurmo::t('MarketingModule', 'How does Email Marketing work in Zurmo?', LabelUtil::getTranslationParamsForAllModules()) . '</h1>';
     $content .= '<div id="marketing-intro-steps" class="clearfix">';
     $content .= '<div class="third"><h3>' . Zurmo::t('Core', 'Step') . '<strong>1<span>➜</span></strong></h3>';
     $content .= '<p><strong>' . Zurmo::t('MarketingModule', 'Group') . '</strong>';
     $content .= Zurmo::t('MarketingModule', 'Group together the email recipients into a list, use different lists for different purposes');
     $content .= '</p>';
     $content .= '</div>';
     $content .= '<div class="third"><h3>' . Zurmo::t('Core', 'Step') . '<strong>2<span>➜</span></strong></h3>';
     $content .= '<p><strong>' . Zurmo::t('MarketingModule', 'Create') . '</strong>';
     $content .= Zurmo::t('MarketingModule', 'Create the template for the email you are going to send, import and use either full, ' . 'rich HTML templates or plain text');
     $content .= '</p>';
     $content .= '</div>';
     $content .= '<div class="third"><h3>' . Zurmo::t('Core', 'Step') . '<strong>3</strong></h3>';
     $content .= '<p><strong>' . Zurmo::t('MarketingModule', 'Launch') . '</strong>';
     $content .= Zurmo::t('MarketingModule', 'Create a campaign where you can schedule your email to go out, pick the List(s) of recipients, ' . 'add and schedule autoresponders and track your overall campaign performance');
     $content .= '</p>';
     $content .= '</div>';
     $content .= '</div>';
     $content .= $this->renderHideLinkContent();
     $content .= '</div>';
     return $content;
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:35,代码来源:MarketingDashboardIntroView.php

示例8: translatedAttributeLabels

 protected static function translatedAttributeLabels($language)
 {
     $params = LabelUtil::getTranslationParamsForAllModules();
     $paramsForAffiliations = $params;
     $paramsForAffiliations['{primaryAccount}'] = AccountAccountAffiliationsModule::resolveAccountRelationLabel('Singular', 'primary');
     $paramsForAffiliations['{secondaryAccount}'] = AccountAccountAffiliationsModule::resolveAccountRelationLabel('Singular', 'secondary');
     return array_merge(parent::translatedAttributeLabels($language), array('account' => Zurmo::t('AccountsModule', 'Parent AccountsModuleSingularLabel', $params, null, $language), 'accounts' => Zurmo::t('AccountsModule', 'AccountsModulePluralLabel', $params, null, $language), 'annualRevenue' => Zurmo::t('AccountsModule', 'Annual Revenue', array(), null, $language), 'billingAddress' => Zurmo::t('AccountsModule', 'Service Address', array(), null, $language), 'contacts' => Zurmo::t('ContactsModule', 'ContactsModulePluralLabel', $params, null, $language), 'description' => Zurmo::t('ZurmoModule', 'Description', array(), null, $language), 'employees' => Zurmo::t('AccountsModule', 'Employees', array(), null, $language), 'industry' => Zurmo::t('ZurmoModule', 'Industry', array(), null, $language), 'latestActivityDateTime' => Zurmo::t('ZurmoModule', 'Latest Activity Date Time', array(), null, $language), 'meetings' => Zurmo::t('MeetingsModule', 'MeetingsModulePluralLabel', $params, null, $language), 'name' => Zurmo::t('Core', 'Name', array(), null, $language), 'notes' => Zurmo::t('NotesModule', 'NotesModulePluralLabel', $params, null, $language), 'officePhone' => Zurmo::t('ZurmoModule', 'Office Phone', array(), null, $language), 'officeFax' => Zurmo::t('ZurmoModule', 'Office Fax', array(), null, $language), 'opportunities' => Zurmo::t('OpportunitiesModule', 'OpportunitiesModulePluralLabel', $params, null, $language), 'contracts' => Zurmo::t('ContractsModule', 'ContractsModulePluralLabel', $params, null, $language), 'primaryAccountAffiliations' => Zurmo::t('AccountAccountAffiliationsModule', '{primaryAccount} Affiliations', $paramsForAffiliations, null, $language), 'primaryEmail' => Zurmo::t('ZurmoModule', 'Primary Email', array(), null, $language), 'secondaryAccountAffiliations' => Zurmo::t('AccountAccountAffiliationsModule', '{secondaryAccount} Affiliations', $paramsForAffiliations, null, $language), 'secondaryEmail' => Zurmo::t('ZurmoModule', 'Secondary Email', array(), null, $language), 'shippingAddress' => Zurmo::t('AccountsModule', 'Shipping Address', array(), null, $language), 'tasks' => Zurmo::t('TasksModule', 'TasksModulePluralLabel', $params, null, $language), 'type' => Zurmo::t('Core', 'Type', array(), null, $language), 'website' => Zurmo::t('ZurmoModule', 'Website', array(), null, $language)));
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:8,代码来源:Account.php

示例9: getCompleteMessage

 protected function getCompleteMessage()
 {
     $successfulCount = MassEditInsufficientPermissionSkipSavingUtil::resolveSuccessfulCountAgainstSkipCount($this->totalRecordCount, $this->skipCount);
     $content = $successfulCount . "&#160;" . LabelUtil::getUncapitalizedRecordLabelByCount($successfulCount) . "&#160;" . 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

示例10: getTranslatedRightsLabels

 public static function getTranslatedRightsLabels()
 {
     $params = LabelUtil::getTranslationParamsForAllModules();
     $labels = array();
     $labels[self::RIGHT_CREATE_OPPORTUNITIES] = Zurmo::t('OpportunitiesModule', 'Create OpportunitiesModulePluralLabel', $params);
     $labels[self::RIGHT_DELETE_OPPORTUNITIES] = Zurmo::t('OpportunitiesModule', 'Delete OpportunitiesModulePluralLabel', $params);
     $labels[self::RIGHT_ACCESS_OPPORTUNITIES] = Zurmo::t('OpportunitiesModule', 'Access OpportunitiesModulePluralLabel Tab', $params);
     return $labels;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:9,代码来源:OpportunitiesModule.php

示例11: getTranslatedRightsLabels

 public static function getTranslatedRightsLabels()
 {
     $params = LabelUtil::getTranslationParamsForAllModules();
     $labels = array();
     $labels[self::RIGHT_CREATE_DEPARTMENTREFERENCES] = Zurmo::t('DepartmentReferencesModule', 'Create DepartmentReferencesModulePluralLabel', $params);
     $labels[self::RIGHT_DELETE_DEPARTMENTREFERENCES] = Zurmo::t('DepartmentReferencesModule', 'Delete DepartmentReferencesModulePluralLabel', $params);
     $labels[self::RIGHT_ACCESS_DEPARTMENTREFERENCES] = Zurmo::t('DepartmentReferencesModule', 'Access DepartmentReferencesModulePluralLabel Tab', $params);
     return $labels;
 }
开发者ID:RamaKavanan,项目名称:BaseVersion,代码行数:9,代码来源:DepartmentReferencesModule.php

示例12: getTranslatedRightsLabels

 public static function getTranslatedRightsLabels()
 {
     $params = LabelUtil::getTranslationParamsForAllModules();
     $labels = array();
     $labels[self::RIGHT_CREATE_MEETINGS] = Zurmo::t('MeetingsModule', 'Create MeetingsModulePluralLabel', $params);
     $labels[self::RIGHT_DELETE_MEETINGS] = Zurmo::t('MeetingsModule', 'Delete MeetingsModulePluralLabel', $params);
     $labels[self::RIGHT_ACCESS_MEETINGS] = Zurmo::t('MeetingsModule', 'Access MeetingsModulePluralLabel', $params);
     return $labels;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:9,代码来源:MeetingsModule.php

示例13: getTranslatedRightsLabels

 public static function getTranslatedRightsLabels()
 {
     $params = LabelUtil::getTranslationParamsForAllModules();
     $labels = array();
     $labels[self::RIGHT_CREATE_UNITOFMEASURES] = Zurmo::t('UnitofmeasuresModule', 'Create UnitofmeasuresModulePluralLabel', $params);
     $labels[self::RIGHT_DELETE_UNITOFMEASURES] = Zurmo::t('UnitofmeasuresModule', 'Delete UnitofmeasuresModulePluralLabel', $params);
     $labels[self::RIGHT_ACCESS_UNITOFMEASURES] = Zurmo::t('UnitofmeasuresModule', 'Access UnitofmeasuresModulePluralLabel Tab', $params);
     return $labels;
 }
开发者ID:RamaKavanan,项目名称:BaseVersion,代码行数:9,代码来源:UnitofmeasuresModule.php

示例14: renderLabel

 protected function renderLabel()
 {
     $label = Zurmo::t('LeadsModule', 'ContactsModuleSingularLabel or LeadsModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules());
     if ($this->form === null) {
         return $this->getFormattedAttributeLabel();
     }
     $id = $this->getIdForHiddenField();
     return $this->form->labelEx($this->model, $this->attribute, array('for' => $id, 'label' => $label));
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:9,代码来源:AllStatesContactElement.php

示例15: getTranslatedRightsLabels

 /**
  * @return array
  */
 public static function getTranslatedRightsLabels()
 {
     $params = LabelUtil::getTranslationParamsForAllModules();
     $labels = array();
     $labels[self::RIGHT_CREATE_CALENDAR] = Zurmo::t('CalendarsModule', 'Create CalendarsModulePluralLabel', $params);
     $labels[self::RIGHT_DELETE_CALENDAR] = Zurmo::t('CalendarsModule', 'Delete CalendarsModulePluralLabel', $params);
     $labels[self::RIGHT_ACCESS_CALENDAR] = Zurmo::t('CalendarsModule', 'Access CalendarsModulePluralLabel Tab', $params);
     return $labels;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:12,代码来源:CalendarsModule.php


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