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


PHP ZurmoConfigurationUtil::getByModuleName方法代码示例

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


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

示例1: preFilter

 protected function preFilter($filterChain)
 {
     $sendGridPluginEnabled = (bool) ZurmoConfigurationUtil::getByModuleName('SendGridModule', 'enableSendgrid');
     try {
         if ($sendGridPluginEnabled) {
             SendGridEmailAccount::getByUserAndName(Yii::app()->user->userModel, null);
         } else {
             EmailAccount::getByUserAndName(Yii::app()->user->userModel);
         }
     } catch (NotFoundException $e) {
         $redirectUrl = Yii::app()->request->getParam('redirectUrl');
         if ($sendGridPluginEnabled) {
             try {
                 EmailAccount::getByUserAndName(Yii::app()->user->userModel);
             } catch (NotFoundException $ex) {
                 $messageView = new NoUserEmailConfigurationYetView($redirectUrl);
                 $view = new ModalView($this->controller, $messageView);
                 Yii::app()->getClientScript()->setToAjaxMode();
                 echo $view->render();
                 return false;
             }
         } else {
             $messageView = new NoUserEmailConfigurationYetView($redirectUrl);
             $view = new ModalView($this->controller, $messageView);
             Yii::app()->getClientScript()->setToAjaxMode();
             echo $view->render();
             return false;
         }
     }
     return true;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:31,代码来源:UserEmailConfigurationCheckControllerFilter.php

示例2: renderContent

 protected function renderContent()
 {
     $homeUrl = Yii::app()->createUrl('home/default');
     $content = '<div class="clearfix">';
     $content .= '<a href="#" id="nav-trigger" title="Toggle Navigation">&rsaquo;</a>';
     $content .= '<div id="corp-logo">';
     if ($logoFileModelId = ZurmoConfigurationUtil::getByModuleName('ZurmoModule', 'logoFileModelId')) {
         $logoFileModel = FileModel::getById($logoFileModelId);
         $logoFileSrc = Yii::app()->getAssetManager()->getPublishedUrl(Yii::getPathOfAlias('application.runtime.uploads') . DIRECTORY_SEPARATOR . $logoFileModel->name);
     } else {
         $logoFileSrc = Yii::app()->themeManager->baseUrl . '/default/images/Zurmo_logo.png';
     }
     $logoHeight = ZurmoConfigurationFormAdapter::resolveLogoHeight();
     $logoWidth = ZurmoConfigurationFormAdapter::resolveLogoWidth();
     if (Yii::app()->userInterface->isMobile()) {
         $content .= '<a href="' . $homeUrl . '"><img src="' . $logoFileSrc . '" alt="Zurmo Logo" /></a>';
         //make sure width and height are NEVER defined
     } else {
         $content .= '<a href="' . $homeUrl . '"><img src="' . $logoFileSrc . '" alt="Zurmo Logo" height="' . $logoHeight . '" width="' . $logoWidth . '" /></a>';
     }
     if ($this->applicationName != null) {
         $content .= ZurmoHtml::tag('span', array(), $this->applicationName);
     }
     $content .= '</div>';
     if (!empty($this->userMenuItems) && !empty($this->settingsMenuItems)) {
         $content .= '<div id="user-toolbar" class="clearfix">';
         $content .= static::renderHeaderMenus($this->userMenuItems, $this->settingsMenuItems);
         $content .= '</div>';
     }
     $content .= '</div>';
     return $content;
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:32,代码来源:HeaderLinksView.php

示例3: getConfigForKey

 protected static function getConfigForKey($key)
 {
     $value = ZurmoConfigurationUtil::getByModuleName(static::CONFIG_MODULE_NAME, $key);
     if ($key == 'bounceImapPassword') {
         $value = ZurmoPasswordSecurityUtil::decrypt($value);
     }
     return $value;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:8,代码来源:BounceConfigurationFormAdapter.php

示例4: getTitle

 public function getTitle()
 {
     $applicationName = ZurmoConfigurationUtil::getByModuleName('ZurmoModule', 'applicationName');
     if ($applicationName != null) {
         $applicationName = ' - ' . $applicationName;
     }
     return Zurmo::t('MarketingListsModule', 'My Subscriptions') . $applicationName;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:8,代码来源:MarketingListsManageSubscriptionsListView.php

示例5: getMaxCount

 /**
  * @return int
  */
 public static function getMaxCount()
 {
     $maxCount = ZurmoConfigurationUtil::getByModuleName(static::CONFIG_MODULE_NAME, static::CONFIG_KEY);
     if ($maxCount == null) {
         $maxCount = static::$maxCount;
     }
     return (int) $maxCount;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:11,代码来源:KanbanBoardExtendedGridView.php

示例6: getTitle

 /**
  * Get the global page title value.
  * @return string - page title.
  */
 public function getTitle()
 {
     if (null != ($pageTitle = ZurmoConfigurationUtil::getByModuleName('ZurmoModule', 'pageTitle'))) {
         return $pageTitle;
     } else {
         return Zurmo::t('ZurmoModule', 'ZurmoCRM');
     }
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:12,代码来源:ZurmoPageView.php

示例7: testResolveApplicationName

 /**
  * @depends testResolveBaseUrl
  */
 public function testResolveApplicationName()
 {
     ZurmoConfigurationUtil::setByModuleName('ZurmoModule', 'applicationName', 'Demo App');
     $resolvedApplicationName = SpecialMergeTagsAdapter::resolve('applicationName', null);
     $expectedApplicationName = ZurmoConfigurationUtil::getByModuleName('ZurmoModule', 'applicationName');
     $this->assertNotNull($resolvedApplicationName);
     $this->assertEquals($expectedApplicationName, $resolvedApplicationName);
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:11,代码来源:SpecialMergeTagsAdapterTest.php

示例8: makeFormFromMarketingConfiguration

 /**
  * Creates a form populated with the marketing configuration global stored values.
  * @return MarketingConfigurationForm
  */
 public static function makeFormFromMarketingConfiguration()
 {
     $form = new MarketingConfigurationForm();
     $form->autoresponderOrCampaignFooterPlainText = GlobalMarketingFooterUtil::getContentByType(false);
     $form->autoresponderOrCampaignFooterRichText = GlobalMarketingFooterUtil::getContentByType(true);
     $form->useAutoresponderOrCampaignOwnerMailSettings = ZurmoConfigurationUtil::getByModuleName('MarketingModule', 'UseAutoresponderOrCampaignOwnerMailSettings');
     return $form;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:12,代码来源:MarketingConfigurationFormAdapter.php

示例9: getGeoCodeApiKey

 /**
  * Gets the geocode api key from the cofig table.
  * @return string $apiKey or null - geocode Api Key.
  */
 public static function getGeoCodeApiKey()
 {
     if (null != ($apiKey = ZurmoConfigurationUtil::getByModuleName('MapsModule', 'googleMapApiKey'))) {
         return $apiKey;
     } else {
         return null;
     }
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:12,代码来源:ZurmoMappingHelper.php

示例10: isSetCaptchaKeys

 protected function isSetCaptchaKeys()
 {
     $reCaptchaPrivateKey = ZurmoConfigurationUtil::getByModuleName('ZurmoModule', 'reCaptchaPrivateKey');
     $reCaptchaPublicKey = ZurmoConfigurationUtil::getByModuleName('ZurmoModule', 'reCaptchaPublicKey');
     if ($reCaptchaPrivateKey === null || empty($reCaptchaPrivateKey) || $reCaptchaPublicKey === null || empty($reCaptchaPublicKey)) {
         return false;
     }
     return true;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:9,代码来源:ContactWebFormsEnableCaptchaCheckBoxElement.php

示例11: getContentByType

 public static function getContentByType($isHtmlContent, $returnDefault = true)
 {
     $key = static::resolveConfigKeyByContentType($isHtmlContent);
     $content = ZurmoConfigurationUtil::getByModuleName(static::CONFIG_MODULE_NAME, $key);
     if (empty($content) && $returnDefault) {
         $content = static::resolveDefaultValue();
     }
     return $content;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:9,代码来源:AutoresponderOrCampaignMailFooterContentUtil.php

示例12: __construct

 public function __construct(CController $controller, SplashView $splashView)
 {
     $applicationName = ZurmoConfigurationUtil::getByModuleName('ZurmoModule', 'applicationName');
     $header = new HeaderLinksView(array(), array());
     $gridView = new GridView(3, 1);
     $gridView->setView($header, 0, 0);
     $gridView->setView($splashView, 1, 0);
     $gridView->setView(new FooterView(), 2, 0);
     parent::__construct($gridView);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:10,代码来源:MarketingListsExternalActionsPageView.php

示例13: testGetUserToRunAsWithSetOnMissingReturnsDefault

 /**
  * @depends testGetUserToRunAsWithoutSetOnMissingReturnsDefault
  */
 public function testGetUserToRunAsWithSetOnMissingReturnsDefault()
 {
     $util = static::resolveConfigUtilClassName();
     $user = $util::getUserToRunAs();
     $this->assertEquals(Yii::app()->user->userModel, $user);
     $configModuleName = $util::CONFIG_MODULE_NAME;
     $configKey = $util::CONFIG_KEY;
     $userIdInConfig = ZurmoConfigurationUtil::getByModuleName($configModuleName, $configKey);
     $this->assertNotNull($userIdInConfig);
     $this->assertEquals($user->id, $userIdInConfig);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:14,代码来源:BaseControlUserConfigUtilBaseTest.php

示例14: getBatchSize

 /**
  * @param bool $returnDefaultIfMissing
  * @param bool $setDefaultIfMissing
  * @return configuration|int $size
  */
 public static function getBatchSize($returnDefaultIfMissing = true, $setDefaultIfMissing = false)
 {
     $size = ZurmoConfigurationUtil::getByModuleName(static::CONFIG_MODULE_NAME, static::CONFIG_KEY);
     if (empty($size) && $returnDefaultIfMissing) {
         $size = static::CONFIG_DEFAULT_VALUE;
         if ($setDefaultIfMissing) {
             static::setBatchSize($size);
         }
     }
     return $size;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:16,代码来源:AutoresponderOrCampaignBatchSizeConfigUtil.php

示例15: load

 /**
  * Loads state data from persistent storage(database).
  * @return mixed state data. Null if no state data available.
  */
 public function load()
 {
     if (RedBeanDatabase::isSetup()) {
         $content = ZurmoConfigurationUtil::getByModuleName('ZurmoModule', 'globalState');
         $content = unserialize($content);
         if ($content) {
             return $content;
         }
     }
     return null;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:15,代码来源:ZurmoDbStatePersister.php


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