⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 themeconfighandler.class.php

📁 ProjectPier 源码 很好的项目管理程序
💻 PHP
字号:
<?php  class ThemeConfigHandler extends ConfigHandler {      /**    * Array of available themes (subfolders of themes folder)    *    * @var array    */    private $available_themes = array();        /**    * Constructor    *    * @param void    * @return ThemeConfigHandler    */    function __construct() {      $themes_dir = with_slash(THEMES_DIR);            if (is_dir($themes_dir)) {        $d = dir($themes_dir);        while (($entry = $d->read()) !== false) {          if (str_starts_with($entry, '.')) {            continue;          } // if                    if (is_dir($themes_dir . $entry)) {            $this->available_themes[] = $entry;          } // if        } // while        $d->close();      } // if    } // __construct        /**    * Render form control    *    * @param string $control_name    * @return string    */    function render($control_name) {      $options = array();            foreach ($this->available_themes as $theme) {        $option_attributes = $this->getValue() == $theme ? array('selected' => true) : null;        $options[] = option_tag($theme, $theme, $option_attributes);      } // foreach            return select_box($control_name, $options);    } // render    } // ThemeConfigHandler?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -