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


PHP Craft::getBuild方法代码示例

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


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

示例1: run

 /**
  * Dump all tables
  *
  * @return string
  */
 public function run()
 {
     $this->_currentVersion = 'v' . Craft::getVersion() . '.' . Craft::getBuild();
     $result = $this->_processHeader();
     foreach (craft()->db->getSchema()->getTables() as $tableName => $val) {
         $result .= $this->_processTable($tableName);
     }
     $result .= $this->_processConstraints();
     $result .= $this->_processFooter();
     $fileName = IOHelper::cleanFilename(Craft::getSiteName()) . '_' . gmdate('ymd_His') . '_' . $this->_currentVersion . '.sql';
     $filePath = craft()->path->getDbBackupPath() . strtolower($fileName);
     IOHelper::writeToFile($filePath, $result);
     return $filePath;
 }
开发者ID:kentonquatman,项目名称:portfolio,代码行数:19,代码来源:DbBackup.php

示例2: getBodyHtml

 /**
  * Gets the widget's body HTML.
  *
  * @return string
  */
 public function getBodyHtml()
 {
     $id = $this->model->id;
     $js = "new Craft.GetHelpWidget({$id});";
     craft()->templates->includeJs($js);
     craft()->templates->includeJsResource('js/GetHelpWidget.js');
     craft()->templates->includeTranslations('Message sent successfully.');
     $message = "Enter your message here.\n\n" . "------------------------------\n\n" . 'Craft version: ' . Craft::t('{version} build {build}', array('version' => Craft::getVersion(), 'build' => Craft::getBuild())) . "\n" . 'Packages: ' . implode(', ', Craft::getPackages());
     $plugins = craft()->plugins->getPlugins();
     if ($plugins) {
         $pluginNames = array();
         foreach ($plugins as $plugin) {
             $pluginNames[] = $plugin->getName() . ' (' . $plugin->getDeveloper() . ')';
         }
         $message .= "\nPlugins: " . implode(', ', $pluginNames);
     }
     return craft()->templates->render('_components/widgets/GetHelp/body', array('message' => $message));
 }
开发者ID:kentonquatman,项目名称:portfolio,代码行数:23,代码来源:GetHelpWidget.php

示例3: isBreakpointUpdateNeeded

 /**
  * Returns true is the build stored in craft_info is less than the minimum required build on the file system.
  * This effectively makes sure that a user cannot manually update past a manual breakpoint.
  *
  * @return bool
  */
 public function isBreakpointUpdateNeeded()
 {
     // Only Craft has the concept of a breakpoint, not plugins.
     if ($this->isCraftDbUpdateNeeded()) {
         return Craft::getBuild() < CRAFT_MIN_BUILD_REQUIRED;
     } else {
         return false;
     }
 }
开发者ID:kentonquatman,项目名称:portfolio,代码行数:15,代码来源:UpdatesService.php

示例4: getBuild

 /**
  * Returns the installed Craft build.
  *
  * @return string
  */
 public function getBuild()
 {
     return Craft::getBuild();
 }
开发者ID:kentonquatman,项目名称:portfolio,代码行数:9,代码来源:AppVariable.php


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