You are here

function panels_everywhere_context_create_page_content in Panels Everywhere 7

Same name and namespace in other branches
  1. 6 plugins/contexts/page_content.inc \panels_everywhere_context_create_page_content()

It's important to remember that $conf is optional here, because contexts are not always created from the UI.

1 string reference to 'panels_everywhere_context_create_page_content'
page_content.inc in plugins/contexts/page_content.inc

File

plugins/contexts/page_content.inc, line 22

Code

function panels_everywhere_context_create_page_content($empty, $data = NULL, $conf = FALSE) {

  // The input is expected to be an object containing 'title' and 'content'.
  $context = new ctools_context('page_content');
  $context->plugin = 'page_content';
  if ($empty) {
    return $context;
  }
  if ($data !== FALSE) {
    $context->data = $data;
    $context->title = t('Page content');
    return $context;
  }
}