You are here

function panels_renderer_editor::add_meta in Panels 7.3

Same name and namespace in other branches
  1. 6.3 plugins/display_renderers/panels_renderer_editor.class.php \panels_renderer_editor::add_meta()

Attach out-of-band page metadata (e.g., CSS and JS).

This must be done before render, because panels-within-panels must have their CSS added in the right order: inner content before outer content.

Overrides panels_renderer_standard::add_meta

2 calls to panels_renderer_editor::add_meta()
panels_renderer_editor::render in plugins/display_renderers/panels_renderer_editor.class.php
Build inner content, then hand off to layout-specified theme function for final render step.
panels_renderer_ipe::add_meta in panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php
Attach out-of-band page metadata (e.g., CSS and JS).
1 method overrides panels_renderer_editor::add_meta()
panels_renderer_ipe::add_meta in panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php
Attach out-of-band page metadata (e.g., CSS and JS).

File

plugins/display_renderers/panels_renderer_editor.class.php, line 54
Class file to control the main Panels editor.

Class

panels_renderer_editor
@file Class file to control the main Panels editor.

Code

function add_meta() {
  parent::add_meta();
  if ($this->admin) {
    ctools_include('ajax');
    ctools_include('modal');
    ctools_modal_add_js();
    ctools_add_js('panels-base', 'panels');
    ctools_add_js('display_editor', 'panels');
    ctools_add_css('panels_dnd', 'panels');
    ctools_add_css('panels_admin', 'panels');
    drupal_add_library('system', 'ui');
  }
}