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


PHP ModuleInstaller::getErrors方法代码示例

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


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

示例1: buildPackageDisplay

 /**
  * A Static method to Build the display for the package manager
  *
  * @param String form1 - the form to display for manual downloading
  * @param String hidden_fields - the hidden fields related to downloading a package
  * @param String form_action - the form_action to be used when downloading from the server
  * @param String types - the types of objects we will request from the server
  * @param String active_form - the form to display first
  * @return String - a string of html which will be used to display the forms
  */
 function buildPackageDisplay($form1, $hidden_fields, $form_action, $types = array('module'), $active_form = 'form1', $install = false)
 {
     global $current_language, $app_strings;
     $app_strings = return_application_language($current_language);
     $ss = new Sugar_Smarty();
     $ss->assign('APP_STRINGS', $app_strings);
     $ss->assign('FORM_1_PLACE_HOLDER', $form1);
     $ss->assign('form_action', $form_action);
     $ss->assign('hidden_fields', $hidden_fields);
     $result = PackageManagerDisplay::getHeader();
     $isAlive = $result['isAlive'];
     $mi = new ModuleInstaller();
     $mi_errors = $mi->getErrors();
     $error_html = "";
     if (!empty($mi_errors)) {
         $error_html = "<div style='margin:0px 10px 10px 10px;'>";
         foreach ($mi_errors as $error) {
             $error_html .= "<font color='red'>" . $error . "</font><br>";
         }
         $error_html .= "</div>";
     }
     $tree = PackageManagerDisplay::buildTreeView('treeview', $isAlive);
     $tree->tree_style = 'vendor/ytree/TreeView/css/check/tree.css';
     $ss->assign('TREEHEADER', $tree->generate_header());
     $ss->assign('installation', $install ? 'true' : 'false');
     $mod_strings = return_module_language($current_language, "Administration");
     $ss->assign('MOD', $mod_strings);
     $ss->assign('module_load', 'true');
     if (UploadStream::getSuhosinStatus() == false) {
         $ss->assign('ERR_SUHOSIN', true);
     } else {
         $ss->assign('scripts', PackageManagerDisplay::getDisplayScript($install));
     }
     $show_login = false;
     //hiding install from sugar
     $ss->assign('MODULE_SELECTOR', PackageManagerDisplay::buildGridOutput($tree, $mod_strings, $isAlive, $show_login));
     $ss->assign('INSTALL_ERRORS', $error_html);
     $ss->assign('MOD', $mod_strings);
     $descItemsInstalled = $mod_strings['LBL_UW_DESC_MODULES_INSTALLED'];
     $ss->assign('INSTALLED_PACKAGES_HOLDER', PackageManagerDisplay::buildInstalledGrid($mod_strings, $types));
     $str = $ss->fetch('ModuleInstall/PackageManager/tpls/PackageForm.tpl');
     return $str;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:53,代码来源:PackageManagerDisplay.php

示例2: buildPackageDisplay

 /**
  * A Static method to Build the display for the package manager
  *
  * @param String form1 - the form to display for manual downloading
  * @param String hidden_fields - the hidden fields related to downloading a package
  * @param String form_action - the form_action to be used when downloading from the server
  * @param String types - the types of objects we will request from the server
  * @param String active_form - the form to display first
  * @return String - a string of html which will be used to display the forms
  */
 function buildPackageDisplay($form1, $hidden_fields, $form_action, $types = array('module'), $active_form = 'form1', $install = false)
 {
     global $current_language;
     $mod_strings = return_module_language($current_language, "Administration");
     global $app_strings;
     global $sugar_version, $sugar_config;
     $app_strings = return_application_language($current_language);
     $ss = new Sugar_Smarty();
     $ss->assign('FORM_1_PLACE_HOLDER', $form1);
     $ss->assign('form_action', $form_action);
     $ss->assign('hidden_fields', $hidden_fields);
     $result = PackageManagerDisplay::getHeader();
     $header_text = $result['text'];
     $isAlive = $result['isAlive'];
     $show_login = $result['show_login'];
     $mi_errors = ModuleInstaller::getErrors();
     $error_html = "";
     if (!empty($mi_errors)) {
         $error_html = "<tr><td><span>";
         foreach ($mi_errors as $error) {
             $error_html .= "<font color='red'>" . $error . "</font><br>";
         }
         $error_html .= "</span></td></tr>";
     }
     $form2 = "<table  class='tabForm' width='100%'  cellpadding='0' cellspacing='0' width='100%' border='0'>";
     $form2 .= $error_html;
     if (!$isAlive) {
         $form2 .= "<tr><td><span id='span_display_html'>" . $header_text . "</span></td></tr>";
     }
     $form2 .= "</table>";
     $tree = null;
     //if($isAlive){
     $tree = PackageManagerDisplay::buildTreeView('treeview', $isAlive);
     $tree->tree_style = 'include/ytree/TreeView/css/check/tree.css';
     $ss->assign('TREEHEADER', $tree->generate_header());
     //}
     //$form2 .= PackageManagerDisplay::buildLoginPanel($mod_strings);
     $form2 .= "<table  class='tabForm' cellpadding='0' cellspacing='0' width='100%' border='0'>";
     $form2 .= "<tr><td></td><td align='left'>";
     if ($isAlive) {
         $form2 .= "<input type='button' id='modifCredentialsBtn' class='button' onClick='PackageManager.showLoginDialog(true);' value='" . $mod_strings['LBL_MODIFY_CREDENTIALS'] . "'>";
     } else {
         $form2 .= "<input type='button' id='modifCredentialsBtn' class='button' onClick='PackageManager.showLoginDialog(true);' value='" . $mod_strings['LBL_MODIFY_CREDENTIALS'] . "'style='display:none;'>";
     }
     $form2 .= "</td><td align='left'><div id='workingStatusDiv' style='display:none;'>" . SugarThemeRegistry::current()->getImage("sqsWait", "border='0' align='bottom'", null, null, '.gif', "Loading") . "</div></td><td align='right'>";
     if ($isAlive) {
         $form2 .= "<slot><a class=\"listViewTdToolsS1\" id='href_animate' onClick=\"PackageManager.toggleDiv('span_animate_server_div', 'catview');\"><span id='span_animate_server_div'><img src='" . SugarThemeRegistry::current()->getImageURL('basic_search.gif') . "' width='8' height='8' border='0'>&nbsp;Collapse</span></a></slot>";
     } else {
         $form2 .= "<slot><a class=\"listViewTdToolsS1\" id='href_animate' onClick=\"PackageManager.toggleDiv('span_animate_server_div', 'catview');\"><span id='span_animate_server_div' style='display:none;'><img src='" . SugarThemeRegistry::current()->getImageURL('basic_search.gif') . "' width='8' height='8' border='0'>&nbsp;Collapse</span></a></slot>";
     }
     $form2 .= "</td></tr></table>";
     $form2 = '';
     //Commenting out the form as part of sugar depot hiding.
     $ss->assign('installation', $install ? 'true' : 'false');
     $mod_strings = return_module_language($current_language, "Administration");
     $ss->assign('MOD', $mod_strings);
     $ss->assign('module_load', 'true');
     $ss->assign('scripts', PackageManagerDisplay::getDisplayScript($install));
     $show_login = false;
     //hiding install from sugar
     $ss->assign('MODULE_SELECTOR', PackageManagerDisplay::buildGridOutput($tree, $mod_strings, $isAlive, $show_login));
     $ss->assign('FORM_2_PLACE_HOLDER', $form2);
     $ss->assign('MOD', $mod_strings);
     $descItemsInstalled = $mod_strings['LBL_UW_DESC_MODULES_INSTALLED'];
     $ss->assign('INSTALLED_PACKAGES_HOLDER', PackageManagerDisplay::buildInstalledGrid($mod_strings, $types));
     $str = $ss->fetch('ModuleInstall/PackageManager/tpls/PackageForm.tpl');
     return $str;
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:78,代码来源:PackageManagerDisplay.php


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