protected function LayoutParagraphsLayoutRefreshTrait::setLayoutParagraphsLayout in Layout Paragraphs 2.0.x
Setter for layoutParagraphsLayout property.
Also creates an original copy to track changes between original and updated layouts.
Parameters
\Drupal\layout_paragraphs\LayoutParagraphsLayout $layout_paragraphs_layout: The layout paragraphs layout object.
Return value
$this
3 calls to LayoutParagraphsLayoutRefreshTrait::setLayoutParagraphsLayout()
- DeleteComponentForm::buildForm in src/
Form/ DeleteComponentForm.php - Form constructor.
- EditComponentForm::buildForm in src/
Form/ EditComponentForm.php - Form constructor.
- InsertComponentForm::buildForm in src/
Form/ InsertComponentForm.php
File
- src/
LayoutParagraphsLayoutRefreshTrait.php, line 55
Class
- LayoutParagraphsLayoutRefreshTrait
- Trait for managing refresh state for layouts.
Namespace
Drupal\layout_paragraphsCode
protected function setLayoutParagraphsLayout(LayoutParagraphsLayout $layout_paragraphs_layout) {
$this->layoutParagraphsLayout = $layout_paragraphs_layout;
$reference_field = clone $this->layoutParagraphsLayout
->getParagraphsReferenceField();
$settings = $this->layoutParagraphsLayout
->getSettings();
$this->originalLayoutParagraphsLayout = new LayoutParagraphsLayout($reference_field, $settings);
return $this;
}