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


PHP ContactsUtil::resolveStateLabelByLanguage方法代码示例

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


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

示例1: resolveDisplayedValueForRelatedAttribute

 /**
  * Resolves value for related attribute
  * @param string $attribute
  * @param string $relatedAttribute
  * @return string
  */
 protected function resolveDisplayedValueForRelatedAttribute($attribute, $relatedAttribute)
 {
     if ($this->element instanceof LeadStateDropDownElement) {
         $label = ContactsUtil::resolveStateLabelByLanguage($this->model->{$attribute}, Yii::app()->language);
         return Yii::app()->format->text($label);
     }
     return $this->model->{$attribute}->{$relatedAttribute};
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:14,代码来源:LeadModelAttributeAndElementDataToMergeItem.php

示例2: testResolveStateLabelByLanguage

 /**
  * @depends testGetContactStateLabelsKeyedByLanguageAndOrder
  */
 public function testResolveStateLabelByLanguage()
 {
     $states = ContactState::getByName('Qualified');
     $this->assertEquals('Qualified', ContactsUtil::resolveStateLabelByLanguage($states[0], 'en'));
     $this->assertEquals('QualifiedFr', ContactsUtil::resolveStateLabelByLanguage($states[0], 'fr'));
     $this->assertEquals('QualifiedDe', ContactsUtil::resolveStateLabelByLanguage($states[0], 'de'));
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:10,代码来源:ContactsUtilTest.php

示例3: getLeadStateDataFromStartingStateLabelByLanguage

 /**
  * Get an array of states from the starting state onwards, id/translated label pairings of the
  * existing contact states ordered by order.
  * @param string $language
  * @return array
  */
 public static function getLeadStateDataFromStartingStateLabelByLanguage($language)
 {
     assert('is_string($language)');
     $leadStatesData = array();
     $states = ContactState::getAll('order');
     $startingState = ContactsUtil::getStartingStateId();
     foreach ($states as $state) {
         if ($startingState == $state->id) {
             break;
         }
         $state->name = ContactsUtil::resolveStateLabelByLanguage($state, $language);
         $leadStatesData[] = $state;
     }
     return $leadStatesData;
 }
开发者ID:KulturedKitsch,项目名称:kulturedkitsch.info,代码行数:21,代码来源:LeadsUtil.php

示例4: renderControlNonEditable

 /**
  * Renders the noneditable dropdown content.
  * Takes the model attribute value and converts it into the proper display value
  * based on the corresponding dropdown display label.
  * @return A string containing the element's content.
  */
 protected function renderControlNonEditable()
 {
     $label = ContactsUtil::resolveStateLabelByLanguage($this->model->{$this->attribute}, Yii::app()->language);
     return Yii::app()->format->text($label);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:11,代码来源:ContactStateDropDownElement.php


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