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


PHP ContactsUtil::getStartingStateId方法代码示例

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


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

示例1: testContactsUtilSetStartingStateByOrder

 public function testContactsUtilSetStartingStateByOrder()
 {
     $startingStateId = ContactsUtil::getStartingStateId();
     $startingState = ContactState::getById($startingStateId);
     $startingState->delete();
     $this->assertEquals(6, count(ContactState::GetAll()));
     ContactsUtil::setStartingStateByOrder(2);
     $startingStateId = ContactsUtil::getStartingStateId();
     $states = ContactState::getAll('order');
     $this->assertEquals($states[1]->id, $startingStateId);
     $startingState = ContactState::getByName('Recycled');
     $this->assertEquals(1, count($startingState));
     $this->assertEquals($startingState[0]->id, $startingStateId);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:14,代码来源:ContactTest.php

示例2: 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

示例3: testIsStateALeadByStateName

 public function testIsStateALeadByStateName()
 {
     $allContactStates = ContactState::GetAll();
     $this->assertGreaterThan(1, count($allContactStates));
     foreach ($allContactStates as $contactState) {
         if ($contactState->id < ContactsUtil::getStartingStateId()) {
             $isStateALeadByStateNameCorrect = true;
         } else {
             $isStateALeadByStateNameCorrect = false;
         }
         $isStateALead = LeadsUtil::isStateALeadByStateName($contactState->name);
         $this->assertEquals($isStateALead, $isStateALeadByStateNameCorrect);
     }
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:14,代码来源:LeadTest.php


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