class mlpanels_renderer_standard in Multilingual Panels 7
Extends standard renderer, allow Multilingual configs.
Hierarchy
- class \panels_renderer_standard
- class \mlpanels_renderer_standard
Expanded class hierarchy of mlpanels_renderer_standard
2 string references to 'mlpanels_renderer_standard'
- mlpanels.module in ./
mlpanels.module - Multilingual panels.
- mlpanels_renderer_standard.inc in plugins/
display_renderers/ mlpanels_renderer_standard.inc
File
- plugins/
display_renderers/ mlpanels_renderer_standard.class.php, line 10 - Class replacement for standard renderer.
View source
class mlpanels_renderer_standard extends panels_renderer_standard {
/**
* Render pane replacement.
*
* Parse multilingual config and choose apropriate for current language.
*/
function render_pane(&$pane) {
global $language;
// Check if we should skip pane translation.
if (_mlpanels_pane_skip($pane->type, $pane->subtype)) {
// Pass to default renderer.
return parent::render_pane($pane);
}
// Prepare language dependent config.
if (!empty($pane->configuration['mlpanels'])) {
$ml_config = $pane->configuration['mlpanels'];
$ml_config[LANGUAGE_NONE] = $pane->configuration;
unset($ml_config[LANGUAGE_NONE]['mlpanels']);
}
else {
$ml_config[LANGUAGE_NONE] = $pane->configuration;
}
// Set pane config to render.
$pane->configuration = !empty($ml_config[$language->language]) ? $ml_config[$language->language] : $ml_config[LANGUAGE_NONE];
// Pass to default renderer.
return parent::render_pane($pane);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
mlpanels_renderer_standard:: |
function |
Render pane replacement. Overrides panels_renderer_standard:: |
||
panels_renderer_standard:: |
property | TRUE if this renderer is rendering in administrative mode which will allow layouts to have extra functionality. | 1 | |
panels_renderer_standard:: |
property | The fully-loaded Panels display object that is to be rendered. "Fully loaded" is defined as: 1. Having been produced by panels_load_displays(), whether or this page request or at some time in the past and the object was exported. 2. Having… | ||
panels_renderer_standard:: |
property | Where to add standard meta information. There are three possibilities: | ||
panels_renderer_standard:: |
property | The plugin that defines this handler. | ||
panels_renderer_standard:: |
property | An associative array of loaded plugins. Used primarily as a central location for storing plugins that require additional loading beyond reading the plugin definition, which is already statically cached by ctools_get_plugins(). An example is layout… | ||
panels_renderer_standard:: |
property | Include rendered HTML prior to the layout. | ||
panels_renderer_standard:: |
property | A multilevel array of data prepared for rendering. The first level of the array indicates the type of prepared data. The standard renderer populates and uses two top-level keys, 'panes' and 'regions': | ||
panels_renderer_standard:: |
property | Boolean state variable, indicating whether or not the prepare() method has been run. | ||
panels_renderer_standard:: |
property | A multilevel array of rendered data. The first level of the array indicates the type of rendered data, typically with up to three keys: 'layout', 'regions', and 'panes'. The relevant rendered data is stored as the value… | ||
panels_renderer_standard:: |
property | Boolean flag indicating whether to render the layout even if all rendered regions are blank. If FALSE, the layout renders as an empty string (without prefix or suffix) if not in administrative mode. | ||
panels_renderer_standard:: |
property | Include rendered HTML after the layout. | ||
panels_renderer_standard:: |
function | Add CSS information to the renderer. | ||
panels_renderer_standard:: |
function | Attach out-of-band page metadata (e.g., CSS and JS). | 1 | |
panels_renderer_standard:: |
function | Get the Panels storage oparation for a given renderer AJAX method. | 1 | |
panels_renderer_standard:: |
function | Receive and store the display object to be rendered. | ||
panels_renderer_standard:: |
function | Prepare the attached display for rendering. | 1 | |
panels_renderer_standard:: |
function | Prepare the list of panes to be rendered, accounting for visibility/access settings and rendering order. | 1 | |
panels_renderer_standard:: |
function | Prepare the list of regions to be rendered. | ||
panels_renderer_standard:: |
function | Build inner content, then hand off to layout-specified theme function for final render step. | 1 | |
panels_renderer_standard:: |
function | Perform display/layout-level render operations. | ||
panels_renderer_standard:: |
function | Render all prepared panes, first by dispatching to their plugin's render callback, then handing that output off to the pane's style plugin. | 1 | |
panels_renderer_standard:: |
function | Render the interior contents of a single pane. | 1 | |
panels_renderer_standard:: |
function | Render a single panel region. | 1 | |
panels_renderer_standard:: |
function | Render all prepared regions, placing already-rendered panes into their appropriate positions therein. | 1 |