You are here

protected function PanelsIPEPageController::loadPanelsDisplay in Panels 8.4

Same name and namespace in other branches
  1. 8.3 panels_ipe/src/Controller/PanelsIPEPageController.php \Drupal\panels_ipe\Controller\PanelsIPEPageController::loadPanelsDisplay()

Takes the current Page Variant and returns a possibly modified Page Variant based on what's in TempStore for this user.

Parameters

string $panels_storage_type: The Panels storage plugin which holds the Panels display.

string $panels_storage_id: The id within the Panels storage plugin for this Panels display.

Return value

\Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant|NULL

10 calls to PanelsIPEPageController::loadPanelsDisplay()
PanelsIPEPageController::cancel in panels_ipe/src/Controller/PanelsIPEPageController.php
Removes any temporary changes to the variant.
PanelsIPEPageController::getBlockContentForm in panels_ipe/src/Controller/PanelsIPEPageController.php
Drupal AJAX compatible route for rendering a Block Content Type's form.
PanelsIPEPageController::getBlockModelData in panels_ipe/src/Controller/PanelsIPEPageController.php
Gets a single Block from the current Panels Display as data. Uses TempStore.
PanelsIPEPageController::getBlockPluginForm in panels_ipe/src/Controller/PanelsIPEPageController.php
Drupal AJAX compatible route for rendering a given Block Plugin's form.
PanelsIPEPageController::getBlockPluginsData in panels_ipe/src/Controller/PanelsIPEPageController.php
Gets a list of Block Plugins from the server as data.

... See full list

File

panels_ipe/src/Controller/PanelsIPEPageController.php, line 117

Class

PanelsIPEPageController
Contains all JSON endpoints required for Panels IPE + Page Manager.

Namespace

Drupal\panels_ipe\Controller

Code

protected function loadPanelsDisplay($panels_storage_type, $panels_storage_id) {

  /** @var \Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant $panels_display */
  $panels_display = $this->panelsStorage
    ->load($panels_storage_type, $panels_storage_id);

  // If a temporary configuration for this variant exists, use it.
  if ($variant_config = $this->tempStore
    ->get($panels_display
    ->getTempStoreId())) {
    $panels_display
      ->setConfiguration($variant_config);
  }
  return $panels_display;
}