本文整理匯總了PHP中Flyspray::listThemes方法的典型用法代碼示例。如果您正苦於以下問題:PHP Flyspray::listThemes方法的具體用法?PHP Flyspray::listThemes怎麽用?PHP Flyspray::listThemes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Flyspray
的用法示例。
在下文中一共展示了Flyspray::listThemes方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setTheme
function setTheme($theme = '')
{
// Check available themes
$themes = Flyspray::listThemes();
if (in_array($theme, $themes)) {
$this->_theme = $theme . '/';
} else {
$this->_theme = $themes[0] . '/';
}
}
示例2: Project
function Project($id)
{
global $db, $fs;
// Get custom fields
$fields = $db->x->getAll('SELECT f.*, l.list_type
FROM {fields} f
LEFT JOIN {lists} l ON f.list_id = l.list_id
WHERE f.project_id IN (0, ?) ORDER BY field_name', null, array($id));
foreach ($fields as $field) {
$f = new Field($field);
if ($f->id == $fs->prefs['color_field']) {
$f->values = $this->get_list($f->prefs, $f->id);
}
$this->fields['field' . $field['field_id']] = $f;
}
$this->columns = array_combine($this->columns, array_map('L', $this->columns));
foreach ($this->fields as $field) {
$this->columns['field' . $field->id] = $field->prefs['field_name'];
}
if (is_numeric($id) && $id > 0) {
$this->prefs = $db->x->getRow("SELECT p.*, c.content AS pm_instructions, c.last_updated AS cache_update\n FROM {projects} p\n LEFT JOIN {cache} c ON c.topic = p.project_id AND c.type = 'msg'\n WHERE p.project_id = ?", null, array($id));
if (is_array($this->prefs)) {
$this->id = (int) $this->prefs['project_id'];
$this->prefs['visible_columns'] = implode(' ', array_intersect(explode(' ', $this->prefs['visible_columns']), array_keys($this->columns)));
$this->prefs['theme_style'] = Filters::enum($this->prefs['theme_style'], Flyspray::listThemes());
return;
}
}
$this->id = 0;
$this->prefs = array();
$this->prefs['project_title'] = L('allprojects');
$this->prefs['feed_description'] = L('feedforall');
$this->prefs['theme_style'] = $fs->prefs['global_theme'];
$this->prefs['theme_style'] = Filters::enum($this->prefs['theme_style'], Flyspray::listThemes());
$this->prefs['lang_code'] = $fs->prefs['lang_code'];
$this->prefs['others_view'] = 1;
$this->prefs['intro_message'] = '';
$this->prefs['anon_open'] = $this->prefs['override_user_lang'] = 0;
$this->prefs['feed_img_url'] = '';
$this->prefs['default_entry'] = $fs->prefs['default_entry'];
$this->prefs['notify_reply'] = '';
$fs->prefs['visible_columns'] = implode(' ', array_intersect(explode(' ', $fs->prefs['visible_columns']), array_keys($this->columns)));
return;
}