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


PHP Theme::getTheme方法代码示例

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


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

示例1: templates

 public function templates()
 {
     $path = Config::get('view.paths');
     $fileSystem = new Filesystem();
     $files = $fileSystem->allFiles($path[0] . DIRECTORY_SEPARATOR . Theme::getTheme() . DIRECTORY_SEPARATOR . 'site' . DIRECTORY_SEPARATOR . 'layouts');
     return $files;
 }
开发者ID:Aranjedeath,项目名称:Laravel_Starter,代码行数:7,代码来源:Post.php

示例2: widgets

 public static function widgets()
 {
     $path = Config::get('view.paths');
     $fileSystem = new Filesystem();
     $theme = Theme::getTheme();
     $files = $fileSystem->allFiles($path[0] . DIRECTORY_SEPARATOR . $theme . DIRECTORY_SEPARATOR . "admin" . DIRECTORY_SEPARATOR . "widgets");
     return $files;
 }
开发者ID:Aranjedeath,项目名称:Laravel_Starter,代码行数:8,代码来源:Dashboard.php

示例3: 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

示例4: testDisplayConfigForm

 public function testDisplayConfigForm()
 {
     set_option(Theme::PUBLIC_THEME_OPTION, self::THEME);
     $theme = Theme::getTheme(self::THEME);
     $name = $theme->title;
     $this->request->setParam('name', self::THEME);
     $this->dispatch('themes/config');
     $this->assertController('themes');
     $this->assertAction('config');
     $this->assertQueryContentContains('h2', $name);
     $this->assertQuery('input#logo');
 }
开发者ID:emhoracek,项目名称:Omeka,代码行数:12,代码来源:ThemesControllerTest.php

示例5: postEdit

 public function postEdit()
 {
     $themeId = \Input::get('theme');
     $fileName = \Input::get('file');
     $type = \Input::get('type', 'template');
     $content = \Input::get('content');
     $theme = \Theme::getTheme($themeId);
     $files = $theme->getEditFiles();
     $filePath = $files[$type][$fileName];
     try {
         file_put_contents($filePath, $content);
     } catch (\Exception $e) {
         throw new FileAccessDeniedHttpException();
     }
     return \Redirect::back()->with('alert', ['type' => 'success', 'message' => '저장되었습니다.']);
 }
开发者ID:mint-soft-com,项目名称:xpressengine,代码行数:16,代码来源:ThemeController.php

示例6: configAction

 /**
  * Load the configuration form for a specific theme.  
  * That configuration form will be POSTed back to this URL.
  *
  * @return void
  */
 public function configAction()
 {
     // get the theme name and theme object
     $themeName = $this->_getParam('name');
     $theme = Theme::getTheme($themeName);
     $themeOptions = Theme::getOptions($themeName);
     // get the configuration form
     $form = new Omeka_Form_ThemeConfiguration(array('themeName' => $themeName));
     $form->removeDecorator('Form');
     // process the form if posted
     if ($this->getRequest()->isPost()) {
         $configHelper = new Omeka_Controller_Action_Helper_ThemeConfiguration();
         if ($newOptions = $configHelper->processForm($form, $_POST, $themeOptions)) {
             Theme::setOptions($themeName, $newOptions);
             $this->_helper->flashMessenger(__('The theme settings were successfully saved!'), 'success');
             $this->_helper->redirector('browse');
         } else {
             $this->_helper->_flashMessenger(__('There was an error on the form. Please try again.'), 'error');
         }
     }
     $this->view->configForm = $form;
     $this->view->theme = $theme;
 }
开发者ID:lchen01,项目名称:STEdwards,代码行数:29,代码来源:ThemesController.php

示例7: init

 public function init()
 {
     parent::init();
     $themeName = $this->getThemeName();
     $theme = Theme::getTheme($themeName);
     $themeConfigIni = $theme->path . '/config.ini';
     if (file_exists($themeConfigIni) && is_readable($themeConfigIni)) {
         // get the theme configuration form specification
         $formIni = new Zend_Config_Ini($themeConfigIni);
         $configSource = array('elements' => $formIni->config);
         if (isset($formIni->groups)) {
             $configSource['displayGroups'] = $formIni->groups;
         }
         $configIni = new Zend_Config($configSource);
         // create an omeka form from the configuration file
         $this->setConfig($configIni);
         if (!($themeConfigValues = $this->getThemeOptions())) {
             $themeConfigValues = Theme::getOptions($themeName);
             $this->setThemeOptions($themeConfigValues);
         }
         // configure all of the form elements
         $elements = $this->getElements();
         foreach ($elements as $element) {
             if ($element instanceof Zend_Form_Element_File) {
                 $this->_processFileElement($element);
             }
         }
         // set all of the form element values
         foreach ($themeConfigValues as $key => $value) {
             if ($this->getElement($key)) {
                 $this->{$key}->setValue($value);
             }
         }
     }
     $this->addElement('hash', 'theme_config_csrf', array('timeout' => 3600));
 }
开发者ID:lchen01,项目名称:STEdwards,代码行数:36,代码来源:ThemeConfiguration.php

示例8: themeConfigAction

 /**
  * Theme configuration page for an exhibit.
  */
 public function themeConfigAction()
 {
     $exhibit = $this->_helper->db->findById();
     $themeName = (string) $exhibit->theme;
     // Abort if no specific theme is selected.
     if ($themeName == '') {
         $this->_helper->flashMessenger(__('You must specifically select a theme in order to configure it.'), 'error');
         $this->_helper->redirector->gotoRoute(array('action' => 'edit', 'id' => $exhibit->id), 'exhibitStandard');
         return;
     }
     $theme = Theme::getTheme($themeName);
     $previousOptions = $exhibit->getThemeOptions();
     $form = new Omeka_Form_ThemeConfiguration(array('themeName' => $themeName, 'themeOptions' => $previousOptions));
     $form->removeDecorator('Form');
     $themeConfigIni = $theme->path . DIRECTORY_SEPARATOR . 'config.ini';
     if (file_exists($themeConfigIni) && is_readable($themeConfigIni)) {
         try {
             $pluginsIni = new Zend_Config_Ini($themeConfigIni, 'plugins');
             $excludeFields = $pluginsIni->exclude_fields;
             $excludeFields = explode(',', $excludeFields);
         } catch (Exception $e) {
             $excludeFields = array();
         }
         foreach ($excludeFields as $excludeField) {
             trim($excludeField);
             $form->removeElement($excludeField);
         }
     }
     // process the form if posted
     if ($this->getRequest()->isPost()) {
         $configHelper = new Omeka_Controller_Action_Helper_ThemeConfiguration();
         if ($newOptions = $configHelper->processForm($form, $_POST, $previousOptions)) {
             $exhibit->setThemeOptions($newOptions);
             $exhibit->save();
             $this->_helper->_flashMessenger(__('The theme settings were successfully saved!'), 'success');
             $this->_helper->redirector->gotoRoute(array('action' => 'edit', 'id' => $exhibit->id), 'exhibitStandard');
         } else {
             $this->_helper->_flashMessenger(__('There was an error on the form. Please try again.'), 'error');
         }
     }
     $this->view->assign(compact('exhibit', 'form', 'theme'));
 }
开发者ID:HCDigitalScholarship,项目名称:scattergoodjournals,代码行数:45,代码来源:ExhibitsController.php

示例9: strtolower

}
$body_classes = "items show ";
if ($item_type = $item->getItemType()) {
    $body_classes .= strtolower(str_replace(' ', '-', $item_type->name));
}
if (count($audios) > 0) {
    $body_classes .= " audios";
}
if (count($videos) > 0) {
    $body_classes .= " videos";
}
if (count($images) > 0) {
    $body_classes .= " images";
}
echo head(array('title' => metadata('item', array('Dublin Core', 'Title')), 'bodyclass' => $body_classes));
$theme_path = Theme::getTheme(Theme::getCurrentThemeName())->getAssetPath();
?>


<div id="title-row">
  <div class="title">
    <h2><?php 
echo metadata('item', array('Dublin Core', 'Title'));
?>
</h2>

    <span class="collection">
      <!-- Collections: use CollectionTree or fallback to default -->
      <?php 
if (metadata('item', 'Collection Name')) {
    ?>
开发者ID:srerickson,项目名称:harlem-theme,代码行数:31,代码来源:show.php

示例10: emailTemplates

 /**
  * fetch email templates
  *
  * @return Response
  */
 private function emailTemplates()
 {
     $path = Config::get('view.paths');
     $fileSystem = new Filesystem();
     $files = $fileSystem->allFiles($path[0] . DIRECTORY_SEPARATOR . Theme::getTheme() . DIRECTORY_SEPARATOR . "emails");
     return $files;
 }
开发者ID:Aranjedeath,项目名称:l4-starter,代码行数:12,代码来源:AdminUsersController.php

示例11: action_edit

 /**
  * Editing Widgets
  */
 public function action_edit()
 {
     $id = (int) $this->request->param('id', 0);
     $widget = ORM::factory('widget', $id);
     if (!$widget->loaded()) {
         Log::error('Attempt to access non-existent widget.');
         Message::error(__('Widget doesn\'t exists!'));
         $this->request->redirect(Route::get('admin/widget')->uri());
     }
     $widget_regions = array();
     $adminTheme = Theme::getTheme();
     $frontTheme = Theme::getTheme(Config::get('site.theme', $adminTheme->name));
     if (isset($adminTheme->regions) and !empty($adminTheme->regions)) {
         $widget_regions = Arr::merge($widget_regions, $adminTheme->regions);
     }
     if (isset($frontTheme->regions) and !empty($frontTheme->regions)) {
         $widget_regions = Arr::merge($widget_regions, $frontTheme->regions);
     }
     $handler = Widget::factory($widget->name, $widget);
     $fields = $handler->form();
     // Add a last region for disabled blocks.
     $widget_regions = Arr::merge($widget_regions, array(self::$WIDGET_REGION_NONE => self::$WIDGET_REGION_NONE));
     if (isset($widget_regions[self::$WIDGET_REGION_NONE])) {
         $widget_regions[self::$WIDGET_REGION_NONE] = __('Disabled');
     }
     $all_roles = ORM::factory('role')->find_all()->as_array('id', 'name');
     $this->title = __('Edit %widget widget', array('%widget' => $widget->title));
     $view = View::factory('admin/widget/form')->set('widget', $widget)->set('fields', $fields)->set('roles', $all_roles)->set('regions', $widget_regions);
     if ($this->valid_post('widget')) {
         $widget->values($_POST);
         try {
             $widget->save();
             if (isset($_POST['widget'])) {
                 unset($_POST['widget'], $_POST['_token'], $_POST['_action']);
             }
             $handler->save($_POST);
             Message::success(__('Widget %name updated successful!', array('%name' => $widget->title)));
             Cache::instance('widgets')->delete_all();
             // Redirect to listing
             $this->request->redirect(Route::get('admin/widget')->uri());
         } catch (ORM_Validation_Exception $e) {
             $view->errors = $e->errors('models');
         }
     }
     Assets::select2();
     $this->response->body($view);
 }
开发者ID:MenZil-Team,项目名称:cms,代码行数:50,代码来源:widget.php

示例12: queue_js_file

queue_js_file(array('vendor/jquery.nestedSortable', 'navigation'));
$title = __('Edit Exhibit "%s"', $exhibit->title);
echo head(array('title' => html_escape($title), 'bodyclass' => 'exhibits'));
?>
    <div id="exhibits-breadcrumb">
        <a href="<?php 
echo html_escape(url('exhibits'));
?>
"><?php 
echo __('Exhibits');
?>
</a> &gt;
        <?php 
echo html_escape($title);
?>
    </div>

<?php 
echo flash();
$theme = $exhibit->theme ? Theme::getTheme($exhibit->theme) : null;
$formArgs = array('exhibit' => $exhibit, 'theme' => $theme);
$formArgs['csrf'] = isset($csrf) ? $csrf : '';
echo common('exhibit-metadata-form', $formArgs, 'exhibits');
?>

<script type="text/javascript">
    Omeka.addReadyCallback(Omeka.ExhibitBuilder.themeConfig);
</script>

<?php 
echo foot();
开发者ID:fitnycdigitalinitiatives,项目名称:plugin-ExhibitBuilder,代码行数:31,代码来源:edit.php

示例13: left_block

 function left_block()
 {
     $ret_val = container();
     $hr = html_hr();
     $hr->set_tag_attribute("noshade");
     $hr->set_tag_attribute("size", 2);
     $ret_val->add($hr);
     $div = html_div("ul-big");
     //Mensaje de bienvenida
     $div->add($this->_addFileContent(Theme::getTheme() . Session::getContextValue('texto_ini')));
     $ret_val->add($div);
     return $ret_val;
 }
开发者ID:BackupTheBerlios,项目名称:migueloo,代码行数:13,代码来源:miguel_vintro.class.php

示例14: tag_string

            ?>
</li>
                <?php 
        }
        ?>
            </ul>
        </td>
        <td><?php 
        echo tag_string($exhibit, 'exhibits');
        ?>
</td>
        <?php 
        if ($exhibit->theme == null) {
            $themeName = __('Current Public Theme');
        } else {
            $theme = Theme::getTheme($exhibit->theme);
            $themeName = !empty($theme->title) ? $theme->title : $exhibit->theme;
        }
        ?>
        <td><?php 
        echo html_escape($themeName);
        ?>
</td>
        <td><?php 
        echo format_date(metadata($exhibit, 'added'));
        ?>
</td>
    </tr>
<?php 
    }
    ?>
开发者ID:fitnycdigitalinitiatives,项目名称:plugin-ExhibitBuilder,代码行数:31,代码来源:browse.php

示例15: __

<?php

$pageTitle = __('Dashboard');
echo head(array('bodyclass' => 'index primary-secondary', 'title' => $pageTitle));
?>
    
<?php 
$stats = array(array(link_to('items', null, total_records('Item')), __('items')), array(link_to('collections', null, total_records('Collection')), __('collections')), array(link_to('tags', null, total_records('Tag')), __('tags')));
if (is_allowed('Plugins', 'edit')) {
    $stats[] = array(link_to('plugins', null, total_records('Plugin')), __('plugins'));
}
if (is_allowed('Users', 'edit')) {
    $stats[] = array(link_to('users', null, total_records('User')), __('users'));
}
if (is_allowed('Themes', 'edit')) {
    $themeName = Theme::getTheme(Theme::getCurrentThemeName('public'))->title;
    $stats[] = array(link_to('themes', null, $themeName), __('theme'));
}
$stats = apply_filters('admin_dashboard_stats', $stats, array('view' => $this));
?>

<?php 
// Retrieve the latest version of Omeka by pinging the Omeka server.
$userRole = current_user()->role;
if ($userRole == 'super' || $userRole == 'admin') {
    $latestVersion = latest_omeka_version();
    ?>
      <?php 
    if ($latestVersion and version_compare(OMEKA_VERSION, $latestVersion, '<')) {
        ?>
            <div id="flash">
开发者ID:lchen01,项目名称:STEdwards,代码行数:31,代码来源:index.php


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