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


PHP ContactsModule::getModuleLabelByTypeAndLanguage方法代码示例

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


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

示例1: testSuperUserContactDefaultControllerActions

 public function testSuperUserContactDefaultControllerActions()
 {
     $super = $this->logoutCurrentUserLoginNewUserAndGetByUsername('super');
     //Default Controller actions requiring some sort of parameter via POST or GET
     //Load Conatct Modules Menu.
     $this->resetPostArray();
     $this->setGetArray(array('moduleClassName' => 'ContactsModule'));
     $this->runControllerWithNoExceptionsAndGetContent('designer/default/modulesMenu');
     //Load AttributesList for Contacts module.
     $this->setGetArray(array('moduleClassName' => 'ContactsModule'));
     $this->runControllerWithNoExceptionsAndGetContent('designer/default/attributesList');
     //Load ModuleLayoutsList for Conatct module.
     $this->setGetArray(array('moduleClassName' => 'ContactsModule'));
     $this->runControllerWithNoExceptionsAndGetContent('designer/default/moduleLayoutsList');
     //Load ModuleEdit view for each applicable module.
     $this->setGetArray(array('moduleClassName' => 'ContactsModule'));
     $this->runControllerWithNoExceptionsAndGetContent('designer/default/moduleEdit');
     //Now validate save with failed validation.
     $this->setGetArray(array('moduleClassName' => 'ContactsModule'));
     $this->setPostArray(array('ajax' => 'edit-form', 'ContactsModuleForm' => $this->createModuleEditBadValidationPostData()));
     $content = $this->runControllerWithExitExceptionAndGetContent('designer/default/moduleEdit');
     $this->assertTrue(strlen($content) > 50);
     //approximate, but should definetely be larger than 50.
     //Now validate save with successful validation.
     $this->setGetArray(array('moduleClassName' => 'ContactsModule'));
     $this->setPostArray(array('ajax' => 'edit-form', 'ContactsModuleForm' => $this->createModuleEditGoodValidationPostData('con new name')));
     $content = $this->runControllerWithExitExceptionAndGetContent('designer/default/moduleEdit');
     $this->assertEquals('[]', $content);
     //Now save successfully.
     $this->setGetArray(array('moduleClassName' => 'ContactsModule'));
     $this->setPostArray(array('save' => 'Save', 'ContactsModuleForm' => $this->createModuleEditGoodValidationPostData('con new name')));
     $this->runControllerWithRedirectExceptionAndGetContent('designer/default/moduleEdit');
     //Now confirm everything did in fact save correctly.
     $this->assertEquals('Con New Name', ContactsModule::getModuleLabelByTypeAndLanguage('Singular'));
     $this->assertEquals('Con New Names', ContactsModule::getModuleLabelByTypeAndLanguage('Plural'));
     $this->assertEquals('con new name', ContactsModule::getModuleLabelByTypeAndLanguage('SingularLowerCase'));
     $this->assertEquals('con new names', ContactsModule::getModuleLabelByTypeAndLanguage('PluralLowerCase'));
     //Load LayoutEdit for each applicable module and applicable layout
     $this->resetPostArray();
     $this->setGetArray(array('moduleClassName' => 'ContactsModule', 'viewClassName' => 'ContactEditAndDetailsView'));
     $this->runControllerWithNoExceptionsAndGetContent('designer/default/LayoutEdit');
     $this->setGetArray(array('moduleClassName' => 'ContactsModule', 'viewClassName' => 'ContactsListView'));
     $this->runControllerWithNoExceptionsAndGetContent('designer/default/LayoutEdit');
     $this->setGetArray(array('moduleClassName' => 'ContactsModule', 'viewClassName' => 'ContactsModalListView'));
     $this->runControllerWithNoExceptionsAndGetContent('designer/default/LayoutEdit');
     $this->setGetArray(array('moduleClassName' => 'ContactsModule', 'viewClassName' => 'ContactsModalSearchView'));
     $this->runControllerWithNoExceptionsAndGetContent('designer/default/LayoutEdit');
     $this->setGetArray(array('moduleClassName' => 'ContactsModule', 'viewClassName' => 'ContactsMassEditView'));
     $this->runControllerWithNoExceptionsAndGetContent('designer/default/LayoutEdit');
     $this->setGetArray(array('moduleClassName' => 'ContactsModule', 'viewClassName' => 'ContactsRelatedListView'));
     $this->runControllerWithNoExceptionsAndGetContent('designer/default/LayoutEdit');
     $this->setGetArray(array('moduleClassName' => 'ContactsModule', 'viewClassName' => 'ContactsSearchView'));
     $this->runControllerWithNoExceptionsAndGetContent('designer/default/LayoutEdit');
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:54,代码来源:ContactsDesignerSuperUserWalkthroughTest.php

示例2: actionMassDeleteProgress

 /**
  * Action called in the event that the mass delete quantity is larger than the pageSize.
  * This action is called after the pageSize quantity has been delted and continues to be
  * called until the mass delete action is complete.  For example, if there are 20 records to delete
  * and the pageSize is 5, then this action will be called 3 times.  The first 5 are updated when
  * the actionMassDelete is called upon the initial form submission.
  */
 public function actionMassDeleteProgress()
 {
     $pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('massDeleteProgressPageSize');
     $contact = new Contact(false);
     $dataProvider = $this->getDataProviderByResolvingSelectAllFromGet(new ContactsSearchForm($contact), $pageSize, Yii::app()->user->userModel->id, 'ContactsStateMetadataAdapter', 'ContactsSearchView');
     $this->processMassDeleteProgress('Contact', $pageSize, ContactsModule::getModuleLabelByTypeAndLanguage('Plural'), $dataProvider);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:14,代码来源:DefaultController.php

示例3: resolveConfirmAlertInHtmlOptions

 protected function resolveConfirmAlertInHtmlOptions($htmlOptions)
 {
     $htmlOptions['confirm'] = Zurmo::t('Core', 'Are you sure you want to delete this {modelLabel}?', array('{modelLabel}' => ContactsModule::getModuleLabelByTypeAndLanguage('SingularLowerCase')));
     return $htmlOptions;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:5,代码来源:ContactDeleteLinkActionElement.php


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