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


PHP Theme::getAllThemes方法代码示例

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


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

示例1: testGetAvailable

 public function testGetAvailable()
 {
     $themeName = 'seasons';
     $themes = Theme::getAllThemes();
     $this->assertTrue(is_array($themes));
     $theme = Theme::getTheme($themeName);
     $this->assertTrue($theme instanceof Theme);
     $this->assertEquals($themeName, $theme->directory);
 }
开发者ID:emhoracek,项目名称:Omeka,代码行数:9,代码来源:ThemeTest.php

示例2: browseAction

 public function browseAction()
 {
     $csrfForm = new Omeka_Form_SessionCsrf();
     $themes = apply_filters('browse_themes', Theme::getAllThemes());
     $public = get_option(Theme::PUBLIC_THEME_OPTION);
     $this->view->themes = $themes;
     $this->view->current = $themes[$public];
     $this->view->csrf = $csrfForm;
 }
开发者ID:lchen01,项目名称:STEdwards,代码行数:9,代码来源:ThemesController.php

示例3: _addThemeInfo

 private function _addThemeInfo(&$info)
 {
     $themes = Theme::getAllThemes();
     $currentTheme = get_option('public_theme');
     $info['Themes'] = array();
     foreach ($themes as $name => $theme) {
         $themeInfo = @$theme->version;
         if ($name == $currentTheme) {
             $themeInfo .= ' (current)';
         }
         $info['Themes'][$name] = $themeInfo;
     }
     ksort($info['Themes']);
 }
开发者ID:lchen01,项目名称:STEdwards,代码行数:14,代码来源:SystemInfoController.php

示例4: init

 public function init()
 {
     // No cache for auto-refresh uploaded logo
     header('Cache-Control: no-cache, must-revalidate');
     header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
     parent::init();
     $this->can_display_themes = !Shop::isFeatureActive() || Shop::getContext() == Shop::CONTEXT_SHOP;
     libxml_use_internal_errors(true);
     // Download user themes from Addons
     if ($this->logged_on_addons) {
         $this->downloadAddonsThemes();
     }
     // Employee languages used for link and utm_source
     $lang = new Language($this->context->language->id);
     $iso_lang_uc = strtoupper($lang->iso_code);
     $this->fields_options = array('appearance' => array('title' => $this->l('Your current theme'), 'icon' => 'icon-html5', 'tabs' => array('logo' => $this->l('Logo'), 'logo2' => $this->l('Invoice & Email Logos'), 'icons' => $this->l('Icons'), 'mobile' => $this->l('Mobile')), 'fields' => array('PS_LOGO' => array('title' => $this->l('Header logo'), 'hint' => $this->l('Will appear on main page. Recommended height: 52px. Maximum height on default theme: 65px.'), 'type' => 'file', 'name' => 'PS_LOGO', 'tab' => 'logo', 'thumb' => _PS_IMG_ . Configuration::get('PS_LOGO')), 'PS_LOGO_MOBILE' => array('title' => $this->l('Header logo for mobile'), 'desc' => Configuration::get('PS_LOGO_MOBILE') === false ? '<span class="light-warning">' . $this->l('Warning: No mobile logo has been defined. The header logo will be used instead.') . '</span><br />' : '', 'hint' => $this->l('Will appear on the main page of your mobile template. If left undefined, the header logo will be used.'), 'type' => 'file', 'name' => 'PS_LOGO_MOBILE', 'tab' => 'mobile', 'thumb' => Configuration::get('PS_LOGO_MOBILE') !== false && file_exists(_PS_IMG_DIR_ . Configuration::get('PS_LOGO_MOBILE')) ? _PS_IMG_ . Configuration::get('PS_LOGO_MOBILE') : _PS_IMG_ . Configuration::get('PS_LOGO')), 'PS_LOGO_MAIL' => array('title' => $this->l('Mail logo'), 'desc' => Configuration::get('PS_LOGO_MAIL') === false ? '<span class="light-warning">' . $this->l('Warning: if no email logo is available, the main logo will be used instead.') . '</span><br />' : '', 'hint' => $this->l('Will appear on email headers. If undefined, the header logo will be used.'), 'type' => 'file', 'name' => 'PS_LOGO_MAIL', 'tab' => 'logo2', 'thumb' => Configuration::get('PS_LOGO_MAIL') !== false && file_exists(_PS_IMG_DIR_ . Configuration::get('PS_LOGO_MAIL')) ? _PS_IMG_ . Configuration::get('PS_LOGO_MAIL') : _PS_IMG_ . Configuration::get('PS_LOGO')), 'PS_LOGO_INVOICE' => array('title' => $this->l('Invoice logo'), 'desc' => Configuration::get('PS_LOGO_INVOICE') === false ? '<span class="light-warning">' . $this->l('Warning: if no invoice logo is available, the main logo will be used instead.') . '</span><br />' : '', 'hint' => $this->l('Will appear on invoice headers.') . ' ' . $this->l('Warning: you can use a PNG file for transparency, but it can take up to 1 second per page for processing. Please consider using JPG instead.'), 'type' => 'file', 'name' => 'PS_LOGO_INVOICE', 'tab' => 'logo2', 'thumb' => Configuration::get('PS_LOGO_INVOICE') !== false && file_exists(_PS_IMG_DIR_ . Configuration::get('PS_LOGO_INVOICE')) ? _PS_IMG_ . Configuration::get('PS_LOGO_INVOICE') : _PS_IMG_ . Configuration::get('PS_LOGO')), 'PS_FAVICON' => array('title' => $this->l('Favicon'), 'hint' => $this->l('Will appear in the address bar of your web browser.'), 'type' => 'file', 'name' => 'PS_FAVICON', 'tab' => 'icons', 'thumb' => _PS_IMG_ . Configuration::get('PS_FAVICON')), 'PS_STORES_ICON' => array('title' => $this->l('Store icon'), 'hint' => $this->l('Will appear on the store locator (inside Google Maps).') . '<br />' . $this->l('Suggested size: 30x30, transparent GIF.'), 'type' => 'file', 'name' => 'PS_STORES_ICON', 'tab' => 'icons', 'thumb' => _PS_IMG_ . Configuration::get('PS_STORES_ICON')), 'PS_ALLOW_MOBILE_DEVICE' => array('title' => $this->l('Enable the mobile theme'), 'hint' => $this->l('Allows visitors browsing on mobile devices to view a lighter version of your website.'), 'type' => 'radio', 'required' => true, 'validation' => 'isGenericName', 'tab' => 'mobile', 'choices' => array(0 => $this->l('I\'d like to disable it.'), 1 => $this->l('I\'d like to enable it only on smartphones.'), 2 => $this->l('I\'d like to enable it only on tablets.'), 3 => $this->l('I\'d like to enable it on both smartphones and tablets.')))), 'after_tabs' => array('cur_theme' => Theme::getThemeInfo($this->context->shop->id_theme)), 'submit' => array('title' => $this->l('Save')), 'buttons' => array('storeLink' => array('title' => $this->l('Visit the theme catalog'), 'icon' => 'process-icon-themes', 'href' => 'http://addons.prestashop.com/en/3-templates-prestashop' . '?utm_source=back-office&utm_medium=theme-button' . '&utm_campaign=back-office-' . $iso_lang_uc . '&utm_content=' . (defined('_PS_HOST_MODE_') ? 'cloud' : 'download'), 'js' => 'return !window.open(this.href)'))));
     $installed_theme = Theme::getAllThemes(array($this->context->shop->id_theme));
     $non_installed_theme = $this->context->mode == Context::MODE_HOST ? array() : Theme::getNonInstalledTheme();
     if (count($installed_theme) || !empty($non_installed_theme)) {
         $this->fields_options['theme'] = array('title' => sprintf($this->l('Select a theme for the "%s" shop'), $this->context->shop->name), 'description' => !$this->can_display_themes ? $this->l('You must select a shop from the above list if you wish to choose a theme.') : '', 'fields' => array('theme_for_shop' => array('type' => 'theme', 'themes' => $installed_theme, 'not_installed' => $non_installed_theme, 'id_theme' => $this->context->shop->id_theme, 'can_display_themes' => $this->can_display_themes, 'no_multishop_checkbox' => true)));
     }
 }
开发者ID:NathanGiesbrecht,项目名称:PrestaShopAutomationFramework,代码行数:22,代码来源:AdminThemesController.php

示例5: exhibit_builder_get_themes

/**
 * Get an array of available themes
 *
 * @return array
 */
function exhibit_builder_get_themes()
{
    $themeNames = array();
    $themes = apply_filters('browse_themes', Theme::getAllThemes());
    foreach ($themes as $themeDir => $theme) {
        $title = !empty($theme->title) ? $theme->title : $themeDir;
        $themeNames[$themeDir] = $title;
    }
    return $themeNames;
}
开发者ID:rshiggin,项目名称:omeka-custom-exhibit,代码行数:15,代码来源:ExhibitFunctions.php

示例6: _e

</dd>
		</dl>
	</div>
</div>

<div class="box clearfix">
	<div class="box-title">
		<h3><?php 
_e('Available Themes');
?>
</h3>
		<span></span>
	</div>
	<div class="box-content">
	<?php 
$themes = Theme::getAllThemes();
foreach ($themes as $theme) {
    if ($theme == $default) {
        continue;
    }
    $info = Theme::getInfo($theme);
    ?>
		<dl class="box-theme">
			<dt><a href="#" onclick="setTheme('<?php 
    echo $theme;
    ?>
'); return false;" title="应用该主题"><img src="<?php 
    echo $info['screenshot'];
    ?>
"></a></dt>
			<dd class="theme_name"><?php 
开发者ID:ZJU-Shaonian-Biancheng-Tuan,项目名称:logx,代码行数:31,代码来源:index.php


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