You are here

public function ExpirePanels::getPanelPage in Panels Cache Expiration 7

Returns panel page for display.

Parameters

object $display: Panel display.

Return value

object|null Panel page.

1 call to ExpirePanels::getPanelPage()
ExpirePanels::expire in includes/expire.panels.inc
Executes expiration actions for panels.

File

includes/expire.panels.inc, line 81
Provides class that expires panels.

Class

ExpirePanels
@file Provides class that expires panels.

Code

public function getPanelPage($display) {
  ctools_include('export');
  $panel_handler = $this
    ->getPanelHandler($display);
  if (empty($panel_handler)) {
    return NULL;
  }
  $pages = ctools_export_load_object('page_manager_pages', 'conditions', array(
    'task' => $panel_handler->task,
    'name' => $panel_handler->subtask,
  ));
  if (empty($pages)) {
    return NULL;
  }
  return reset($pages);
}