function panels_theme in Panels 6.2
Same name and namespace in other branches
- 6.3 panels.module \panels_theme()
- 7.3 panels.module \panels_theme()
File
- ./
panels.module, line 24 - panels.module
Code
function panels_theme() {
$theme = array();
$theme['panels_layout_link'] = array(
'arguments' => array(
'title',
'id',
'image',
'link',
),
);
$theme['panels_layout_icon'] = array(
'arguments' => array(
'id',
'image',
'title' => NULL,
),
);
$theme['panels_imagebutton'] = array(
'arguments' => array(
'element',
),
);
$theme['panels_edit_display_form'] = array(
'arguments' => array(
'form',
),
'file' => 'includes/display-edit.inc',
);
$theme['panels_edit_layout_form_choose'] = array(
'arguments' => array(
'form',
),
'file' => 'includes/display-edit.inc',
);
$theme['panels_pane'] = array(
'arguments' => array(
'content',
'pane',
'display',
),
'file' => 'includes/display-render.inc',
);
$theme['panels_common_content_list'] = array(
'arguments' => array(
'display',
),
'file' => 'includes/common.inc',
);
$theme['panels_common_context_list'] = array(
'arguments' => array(
'object',
),
'file' => 'includes/common.inc',
);
$theme['panels_common_context_item_form'] = array(
'arguments' => array(
'form',
),
'file' => 'includes/common.inc',
);
$theme['panels_common_context_item_row'] = array(
'arguments' => array(
'type',
'form',
'position',
'count',
'with_tr' => TRUE,
),
'file' => 'includes/common.inc',
);
$theme['panels_dnd'] = array(
'arguments' => array(
'content',
),
'file' => 'includes/display-edit.inc',
'function' => 'theme_panels_dnd',
);
$theme['panels_panel_dnd'] = array(
'arguments' => array(
'content',
'area',
'label',
'footer',
),
'file' => 'includes/display-edit.inc',
'function' => 'theme_panels_panel_dnd',
);
$theme['panels_pane_dnd'] = array(
'arguments' => array(
'block',
'id',
'label',
'left_buttons' => NULL,
'buttons' => NULL,
),
'file' => 'includes/display-edit.inc',
);
$theme['panels_pane_collapsible'] = array(
'arguments' => array(
'block',
),
'file' => 'includes/display-edit.inc',
);
$theme['profile_fields_pane'] = array(
'arguments' => array(
'category' => NULL,
'vars' => NULL,
),
'template' => 'content_types/profile_fields_pane',
);
// Register layout and style themes on behalf of all of these items.
panels_load_include('plugins');
// No need to worry about files; the plugin has to already be loaded for us
// to even know what the theme function is, so files will be auto included.
$layouts = panels_get_layouts();
foreach ($layouts as $name => $data) {
if (!empty($data['theme'])) {
$theme[$data['theme']] = array(
'arguments' => array(
'css_id' => NULL,
'content' => NULL,
'settings' => NULL,
),
'path' => $data['path'],
);
// if no theme function exists, assume template.
if (!function_exists("theme_{$data['theme']}")) {
$theme[$data['theme']]['template'] = str_replace('_', '-', $data['theme']);
}
}
}
$styles = panels_get_styles();
foreach ($styles as $name => $data) {
if (!empty($data['render pane'])) {
$theme[$data['render pane']] = array(
'arguments' => array(
'content' => NULL,
'pane' => NULL,
'display' => NULL,
),
);
}
if (!empty($data['render panel'])) {
$theme[$data['render panel']] = array(
'arguments' => array(
'display' => NULL,
'panel_id' => NULL,
'panes' => NULL,
'settings' => NULL,
),
);
}
}
return $theme;
}