Returns the instantiated layout object.
\Exception
Overrides BoundDisplayInterface::getLayoutInstance
public function getLayoutInstance() {
if ($this->layoutInstance === NULL) {
if (empty($this->layout)) {
throw new \Exception(sprintf('Display "%id" had no layout plugin attached.', array(
'%id' => $this
->id(),
)), E_RECOVERABLE_ERROR);
}
$this->layoutInstance = layout_manager()
->createInstance($this->layout, $this->layoutSettings);
// @todo add handling for remapping if the layout could not be found
}
return $this->layoutInstance;
}