You are here

function panels_everywhere_site_template_get_arguments in Panels Everywhere 6

Same name and namespace in other branches
  1. 7 plugins/tasks/site_template.inc \panels_everywhere_site_template_get_arguments()

Callback to get arguments provided by this task handler.

Since this is the node view and there is no UI on the arguments, we create dummy arguments that contain the needed data.

1 call to panels_everywhere_site_template_get_arguments()
panels_everywhere_site_template_get_contexts in plugins/tasks/site_template.inc
Callback to get context placeholders provided by this handler.
1 string reference to 'panels_everywhere_site_template_get_arguments'
site_template.inc in plugins/tasks/site_template.inc

File

plugins/tasks/site_template.inc, line 34

Code

function panels_everywhere_site_template_get_arguments($task, $subtask_id) {
  $arguments = array();

  // Prior to version 1.8 the URL is passed in as an
  // argument. In 1.8 or later it is derived from the base contexts.
  if (version_compare(CTOOLS_API_VERSION, 1.8, '<')) {
    $arguments[] = array(
      'keyword' => 'url',
      'identifier' => t('URL'),
      'id' => 1,
      'name' => 'string',
      'settings' => array(),
    );
  }
  $arguments[] = array(
    'keyword' => 'content',
    'identifier' => t('Page content'),
    'id' => 1,
    'name' => 'page_content',
    'settings' => array(),
  );

  // Prior to version 1.8 the "managed page" is passed in as an
  // argument. In 1.8 or later it is derived from the base contexts.
  if (version_compare(CTOOLS_API_VERSION, 1.8, '<')) {
    $arguments[] = array(
      'keyword' => 'page',
      'identifier' => t('Managed page'),
      'id' => 1,
      'name' => 'managed_page',
      'settings' => array(),
    );
  }
  return $arguments;
}