• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Zurmo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getStageDropDownArray

 /**
  * Gets array for stages
  * @return array
  */
 protected function getStageDropDownArray()
 {
     $customFieldData = CustomFieldData::getByName('ProductStages');
     $customFieldIndexedData = CustomFieldDataUtil::getDataIndexedByDataAndTranslatedLabelsByLanguage($customFieldData, Yii::app()->language);
     $data = array_merge(array(ProductsConfigurationForm::FILTERED_BY_ALL_STAGES => Zurmo::t('Core', 'All')), $customFieldIndexedData);
     return $data;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:11,代码来源:ProductStageFilterRadioElement.php


示例2: run

 public function run()
 {
     $defaultView = $this->defaultView;
     $inputId = $this->inputId;
     $eventsUrl = Yii::app()->createUrl('calendars/default/getEvents');
     //Set the goto date for calendar
     $startDate = $this->startDate;
     $startDateAttr = explode('-', $startDate);
     $year = $startDateAttr[0];
     $month = intval($startDateAttr[1]) - 1;
     $day = intval($startDateAttr[2]);
     $currentYear = date('Y');
     $currentMonth = intval(date('m')) - 1;
     $currentDay = date('d');
     $maxCount = CalendarItemsDataProvider::MAXIMUM_CALENDAR_ITEMS_COUNT;
     //Register full calendar script and css
     self::registerFullCalendarScriptAndCss();
     //Register qtip for event render
     $qtip = new ZurmoTip();
     $qtip->addQTip(".fc-event");
     $cs = Yii::app()->getClientScript();
     $loadingText = Zurmo::t('Core', 'Loading..');
     // Begin Not Coding Standard
     $script = "\$(document).on('ready', function() {\n                                    \$('#{$inputId}').fullCalendar({\n                                                                    editable: false,\n                                                                    header: {\n                                                                                left: 'prev,next today',\n                                                                                center: 'title',\n                                                                                right: 'month,basicWeek,basicDay'\n                                                                            },\n                                                                     defaultView: '{$defaultView}',\n                                                                     firstDay    :1,\n                                                                     ignoreTimeZone:false,\n                                                                     lazyFetching : false,\n                                                                     loading: function(bool)\n                                                                              {\n                                                                                if (bool)\n                                                                                {\n                                                                                    \$(this).makeLargeLoadingSpinner(true, '#{$inputId}');\n                                                                                }\n                                                                                else\n                                                                                {\n                                                                                    \$(this).makeLargeLoadingSpinner(false, '#{$inputId}');\n                                                                                }\n                                                                              },\n                                                                     eventSources: [\n                                                                                      getCalendarEvents('{$eventsUrl}', '{$inputId}')\n                                                                                   ],\n                                                                     eventRender: function(event, element, view) {\n                                                                                        element.qtip({\n                                                                                            content: {\n                                                                                                        text: '{$loadingText}',\n                                                                                                        ajax: {\n                                                                                                                    url: event.description,\n                                                                                                                    type: 'get'\n                                                                                                                },\n                                                                                                        title: {\n                                                                                                                  text: event.title,\n                                                                                                                  button: 'Close'\n                                                                                                               }\n                                                                                                     },\n                                                                                            style: {classes:'calendar-event-tooltip'},\n                                                                                            show:{\n                                                                                                    event: 'click'\n                                                                                            },\n                                                                                            hide: {\n                                                                                                    event: 'false'\n                                                                                                  },\n                                                                                            position: {\n                                                                                                        my: 'bottom center',\n                                                                                                        at: 'top center',\n                                                                                                        target: 'mouse',\n                                                                                                        viewport: \$('#calendar'),\n                                                                                                        adjust: {\n                                                                                                            mouse: false,\n                                                                                                            scroll: false\n                                                                                                        }\n                                                                                                      }\n                                                                                        });\n                                                                                    },\n                                                                     timeFormat: {\n                                                                                    'month'    : '',\n                                                                                    'basicDay': 'h:mm-{h:mm}tt',\n                                                                                    'basicWeek': 'h:mm-{h:mm}tt'\n                                                                                 }\n                                                                    });\n                                         \$('#{$inputId}').fullCalendar('gotoDate', {$year}, {$month}, {$day});\n                                         \$('.fc-button-today').click(function() {\n                                                                                    \$('#{$inputId}').fullCalendar('changeView', 'basicDay');\n                                                                                    \$('#{$inputId}').fullCalendar('gotoDate', {$currentYear}, {$currentMonth}, {$currentDay});\n                                                                                });\n                                 });";
     // End Not Coding Standard
     $cs->registerScript('loadCalendarScript', $script, ClientScript::POS_END);
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:27,代码来源:FullCalendar.php


示例3: testApiServerUrl

 public function testApiServerUrl()
 {
     if (!$this->isApiTestUrlConfigured()) {
         $this->markTestSkipped(Zurmo::t('ApiModule', 'API test url is not configured in perInstanceTest.php file.'));
     }
     $this->assertTrue(strlen($this->serverUrl) > 0);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:7,代码来源:ApiRestMeetingTest.php


示例4: validateMinimumToRecipients

 /**
  * When the scenario is createNonDraft, it means you have to have at least one recipient
  * @param string $attribute
  * @param array $params
  */
 public function validateMinimumToRecipients($attribute, $params)
 {
     if (isset($this->recipientsData['to']) && $this->recipientsData['to'] != null) {
         return;
     }
     $this->addError($attribute . '_to', Zurmo::t('EmailMessagesModule', 'To address cannot be blank'));
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:12,代码来源:CreateEmailMessageForm.php


示例5: checkServiceAndSetMessagesByMethodNameAndDisplayLabel

 /**
  * Override to handle scenarios where the application can detect apache is installed, but is unable to resolve
  * the version.
  * @see ServiceHelper::checkServiceAndSetMessagesByMethodNameAndDisplayLabel()
  */
 protected function checkServiceAndSetMessagesByMethodNameAndDisplayLabel($methodName, $displayLabel)
 {
     assert('$this->minimumVersion != null &&
                 (is_array($this->minimumVersion) || is_string($this->minimumVersion))');
     assert('is_string($methodName)');
     assert('is_string($displayLabel)');
     $actualVersion = null;
     $minimumVersionLabel = $this->getMinimumVersionLabel();
     $passed = $this->callCheckServiceMethod($methodName, $actualVersion);
     if ($passed) {
         $this->message = $displayLabel . ' ' . Zurmo::t('InstallModule', 'version installed:') . ' ' . $actualVersion;
         $this->message .= ' ' . Zurmo::t('InstallModule', 'Minimum version required:') . ' ' . $minimumVersionLabel;
         return true;
     } else {
         if ($actualVersion == null) {
             if ($_SERVER['SERVER_SOFTWARE'] == 'Apache') {
                 $this->checkResultedInWarning = true;
                 $this->message = $displayLabel . ' ' . Zurmo::t('InstallModule', 'is installed, but the version is unknown.');
             } else {
                 $this->message = $displayLabel . ' ' . Zurmo::t('InstallModule', 'is not installed.');
             }
         } else {
             $this->message = $displayLabel . ' ' . Zurmo::t('InstallModule', 'version installed:') . ' ' . $actualVersion;
         }
         $this->message .= "\n";
         $this->message .= Zurmo::t('InstallModule', 'Minimum version required:') . ' ' . $minimumVersionLabel;
         return false;
     }
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:34,代码来源:WebServerServiceHelper.php


示例6: renderLabel

 /**
  * Override to ensure label is pointing to the right input id
  * @return A string containing the element's label
  */
 protected function renderLabel()
 {
     if ($this->form === null) {
         throw new NotImplementedException();
     }
     return ZurmoHtml::tag('h3', array(), Zurmo::t('ImportModule', 'Please select the module you would like to import to:'));
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:11,代码来源:ImportRulesTypeRadioDropDownElement.php


示例7: makeForExplicitReadWriteModelPermissions

 protected static function makeForExplicitReadWriteModelPermissions($resolvedModelClassName)
 {
     assert('is_string($resolvedModelClassName)');
     $form = new ExplicitReadWriteModelPermissionsWorkflowActionAttributeForm($resolvedModelClassName, 'permissions');
     $form->setDisplayLabel(Zurmo::t('ZurmoModule', 'Who can read and write'));
     return $form;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:7,代码来源:WorkflowActionAttributeFormFactory.php


示例8: testSendSystemEmail

 public function testSendSystemEmail()
 {
     if (!EmailMessageTestHelper::isSetEmailAccountsTestConfiguration()) {
         $this->markTestSkipped(Zurmo::t('EmailMessagesModule', 'Test email settings are not configured in perInstanceTest.php file.'));
     }
     $super = User::getByUsername('super');
     Yii::app()->user->userModel = $super;
     Yii::app()->imap->connect();
     EmailMessage::deleteAll();
     // Expunge all emails from dropbox
     Yii::app()->imap->deleteMessages(true);
     $this->assertEquals(0, EmailMessage::getCount());
     $imapStats = Yii::app()->imap->getMessageBoxStatsDetailed();
     $this->assertEquals(0, $imapStats->Nmsgs);
     $subject = "System Message";
     $textMessage = "System message content.";
     $htmlMessage = "<strong>System</strong> message content.";
     EmailMessageHelper::sendSystemEmail($subject, array(Yii::app()->imap->imapUsername), $textMessage, $htmlMessage);
     sleep(30);
     Yii::app()->imap->connect();
     $imapStats = Yii::app()->imap->getMessageBoxStatsDetailed();
     $this->assertEquals(1, $imapStats->Nmsgs);
     $this->assertEquals(1, EmailMessage::getCount());
     $emailMessages = EmailMessage::getAll();
     $emailMessage = $emailMessages[0];
     $this->assertEquals('System Message', $emailMessage->subject);
     $this->assertEquals('System message content.', trim($emailMessage->content->textContent));
     $this->assertEquals('<strong>System</strong> message content.', trim($emailMessage->content->htmlContent));
     $this->assertEquals(1, count($emailMessage->recipients));
     foreach ($emailMessage->recipients as $recipient) {
         $this->assertEquals($recipient->toAddress, Yii::app()->imap->imapUsername);
         $this->assertEquals(EmailMessageRecipient::TYPE_TO, $recipient->type);
     }
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:34,代码来源:EmailMessageHelperTest.php


示例9: resolveNextPagingAndParams

 protected function resolveNextPagingAndParams($page, $params)
 {
     assert('$params === null || is_array($params)');
     $pageCount = $this->dataProvider->getPagination()->getPageCount();
     $pageSize = $this->dataProvider->getPagination()->getPageSize();
     $totalItemCount = $this->dataProvider->getTotalItemCount();
     $this->subSequenceCompletionPercentage = ($page + 1) / $pageCount * 100;
     if ($page + 1 == $pageCount) {
         $this->nextStep = 'complete';
         $this->setNextMessageByStep($this->nextStep);
         return null;
     } else {
         $params['page'] = $page + 1;
         $this->nextStep = 'processRows';
         $this->setNextMessageByStep($this->nextStep);
         $startItemCount = ($page + 1) * $pageSize + 1;
         if ($startItemCount + ($pageSize - 1) > $totalItemCount) {
             $endItemCount = $totalItemCount;
         } else {
             $endItemCount = ($page + 2) * $pageSize;
         }
         $labelParams = array('{startItemCount}' => $startItemCount, '{endItemCount}' => $endItemCount, '{totalItemCount}' => $totalItemCount);
         $nextMessage = ' ' . Zurmo::t('ImportModule', 'Record(s) {startItemCount} - {endItemCount} of {totalItemCount}', $labelParams);
         $this->nextMessage .= $nextMessage;
         return $params;
     }
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:27,代码来源:ImportSequentialProcess.php


示例10: sanitizeValue

 /**
  * If the attribute specified is required and the value is null, attempt to utilize a default value if it is
  * specified. If it is not specified or the default value specified is not a valid custom field data value, then
  * an InvalidValueToSanitizeException will be thrown.
  * @param string $modelClassName
  * @param string $attributeName
  * @param mixed $value
  * @param array $mappingRuleData
  */
 public static function sanitizeValue($modelClassName, $attributeName, $value, $mappingRuleData)
 {
     assert('is_string($modelClassName)');
     assert('is_string($attributeName)');
     if ($value != null) {
         return $value;
     }
     assert('$value == null || $value instanceof OwnedCustomField');
     assert('$mappingRuleData["defaultValue"] == null || is_string($mappingRuleData["defaultValue"])');
     if ($mappingRuleData['defaultValue'] != null) {
         try {
             $customField = new OwnedCustomField();
             $customField->value = $mappingRuleData['defaultValue'];
             $customField->data = CustomFieldDataModelUtil::getDataByModelClassNameAndAttributeName($modelClassName, $attributeName);
         } catch (NotSupportedException $e) {
             throw new InvalidValueToSanitizeException(Zurmo::t('ImportModule', 'Pick list is missing corresponding custom field data.'));
         }
         return $customField;
     } else {
         $model = new $modelClassName(false);
         if (!$model->isAttributeRequired($attributeName)) {
             return $value;
         }
         throw new InvalidValueToSanitizeException(Zurmo::t('ImportModule', 'Pick list value required, but missing.'));
     }
     return $value;
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:36,代码来源:DropDownRequiredSanitizerUtil.php


示例11: renderTestButton

 /**
  * Render a test button. This link calls a modal popup.
  * @return The element's content as a string.
  */
 protected function renderTestButton()
 {
     $content = '<span>';
     $content .= ZurmoHtml::ajaxLink(ZurmoHtml::wrapLabel(Zurmo::t('EmailMessagesModule', 'Send Test Email')), Yii::app()->createUrl('sendGrid/default/sendTestMessage/', array()), static::resolveAjaxOptionsForTestEmailSettings($this->form->getId()), array('id' => 'SendATestEmailToButton', 'class' => 'EmailTestingButton z-button'));
     $content .= '</span>';
     return $content;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:11,代码来源:SendGridSendATestEmailToElement.php


示例12: filters

 public function filters()
 {
     if (!YII_DEBUG) {
         echo Zurmo::t('ZurmoModule', 'This action is only available in debug mode.');
         Yii::app()->end(0, false);
     }
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:7,代码来源:TestController.php


示例13: setUp

 public function setUp()
 {
     parent::setUp();
     if (!SendGridTestHelper::isSetSendGridAccountTestConfiguration()) {
         $this->markTestSkipped(Zurmo::t('SendGridModule', 'Email test settings are missing.'));
     }
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:7,代码来源:SendGridEmailHelperTest.php


示例14: __toString

 public function __toString()
 {
     $s = self::rightToString($this->type);
     $s .= ':';
     $s .= Zurmo::t('ZurmoModule', $this->name);
     return $s;
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:7,代码来源:Right.php


示例15: getTypeData

 /**
  * @return array
  */
 protected function getTypeData()
 {
     $categories = array();
     $categories['clearCache'][] = array('titleLabel' => Zurmo::t('WorkflowsModule', 'On-Save Workflow'), 'route' => 'workflows/default/create?type=' . Workflow::TYPE_ON_SAVE);
     $categories['clearCache'][] = array('titleLabel' => Zurmo::t('WorkflowsModule', 'Time-Based Workflow'), 'route' => 'workflows/default/create?type=' . Workflow::TYPE_BY_TIME);
     return $categories;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:10,代码来源:WorkflowWizardTypeView.php


示例16: countDataProviderGetDataImportCompleted

 /**
  * Once the import is complete when using getData in ImportUtil::importByDataProvider, this can be called
  * to provide the final count.
  */
 public function countDataProviderGetDataImportCompleted()
 {
     if ($this->messageStreamer != null) {
         $this->messageStreamer->addIgnoringTemplate("\n");
     }
     $this->add(array(MessageLogger::INFO, Zurmo::t('ImportModule', 'Import complete.  Rows processed: {rowsProcessed}', array('{rowsProcessed}' => $this->rowCount))));
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:11,代码来源:ImportMessageLogger.php


示例17: renderContent

 protected function renderContent()
 {
     $message = Zurmo::t('ZurmoModule', 'Sorry! Your browser is not supported.') . ' ' . Zurmo::t('ZurmoModule', 'Please use FireFox, Chrome, or Internet Explorer.');
     $message = Yii::app()->format->text($message);
     $content = "<div>{$message}</div><!-- Detected: {$this->browserName} -->";
     return $content;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:7,代码来源:UnsupportedBrowserView.php


示例18: renderTitleContent

 /**
  * Renders title content.
  * @return string
  */
 protected function renderTitleContent()
 {
     $title = ZurmoHtml::tag('h3', array(), Zurmo::t('CalendarsModule', 'My Calendars'));
     $link = ZurmoHtml::link(ZurmoHtml::tag('span', array('class' => 'z-label'), 'Y'), Yii::app()->createUrl('/calendars/default/create'), array('class' => 'white-button'));
     $content = ZurmoHtml::tag('div', array('class' => 'cal-list-header clearfix'), $title . $link);
     return $content;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:11,代码来源:MyCalendarListView.php


示例19: __toString

 public function __toString()
 {
     if (trim($this->member) == '') {
         return Zurmo::t('Core', '(Unnamed)');
     }
     return $this->member;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:7,代码来源:OwnedSecurableTestItem3.php


示例20: renderContent

 protected function renderContent()
 {
     $imagePath = Yii::app()->themeManager->baseUrl . '/default/images/ajax-loader.gif';
     $progressBarImageContent = ZurmoHtml::image($imagePath, 'Progress Bar');
     $cs = Yii::app()->getClientScript();
     $cs->registerScriptFile($cs->getCoreScriptUrl() . '/jquery.min.js', CClientScript::POS_END);
     $loginUrl = Yii::app()->createUrl('zurmo/default');
     $content = '<div class="MetadataView">';
     $content .= '<table><tr><td>';
     $content .= '<div id="complete-table" style="display:none;">';
     $content .= '<table><tr><td>';
     $content .= Zurmo::t('InstallModule', 'Congratulations! The demo data has been successfully loaded.');
     $content .= '<br/>';
     $content .= '<br/>';
     $content .= Zurmo::t('InstallModule', 'Click below to go to the login page. The username is <b>super</b>');
     $content .= '<br/><br/>';
     $content .= ZurmoHtml::link(Zurmo::t('ZurmoModule', 'Sign in'), $loginUrl);
     $content .= '</td></tr></table>';
     $content .= '</div>';
     $content .= '<div id="progress-table">';
     $content .= '<table><tr><td class="progress-bar">';
     $content .= Zurmo::t('InstallModule', 'Loading demo data. Please wait.');
     $content .= '<br/>';
     $content .= $progressBarImageContent;
     $content .= '<br/>';
     $content .= '</td></tr></table>';
     $content .= '</div>';
     $content .= Zurmo::t('InstallModule', 'Installation Output:');
     $content .= '<div id="logging-table">';
     $content .= '</div>';
     $content .= '</td></tr></table>';
     $content .= '</div>';
     return $content;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:34,代码来源:InstallDemoDataView.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ZurmoBaseTest类代码示例发布时间:2022-05-23
下一篇:
PHP Zotero_DB类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap