You are here

public function BootstrapLayoutsHandlerBase::loadInstance in Bootstrap Layouts 8.5

Same name and namespace in other branches
  1. 8.4 src/Plugin/BootstrapLayouts/BootstrapLayoutsHandlerBase.php \Drupal\bootstrap_layouts\Plugin\BootstrapLayouts\BootstrapLayoutsHandlerBase::loadInstance()

Loads a specific layout instance.

Parameters

string|int $id: The identifier to load.

Return value

\Drupal\bootstrap_layouts\BootstrapLayout The BootstrapLayout instance.

Overrides BootstrapLayoutsHandlerInterface::loadInstance

File

src/Plugin/BootstrapLayouts/BootstrapLayoutsHandlerBase.php, line 45

Class

BootstrapLayoutsHandlerBase
Class BootstrapLayoutsHandlerBase

Namespace

Drupal\bootstrap_layouts\Plugin\BootstrapLayouts

Code

public function loadInstance($entity_id) {
  $layouts = $this
    ->loadInstances([
    $entity_id,
  ]);
  return reset($layouts);
}