Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Section.php

function Section::appendComponent

Appends a component to the end of a region.

Parameters

\Drupal\layout_builder\SectionComponent $component: The component being appended.

Return value

$this

1 call to Section::appendComponent()
Section::insertComponent in core/modules/layout_builder/src/Section.php
Inserts a component at a specified delta.

File

core/modules/layout_builder/src/Section.php, line 236

Class

Section
Provides a domain object for layout sections.

Namespace

Drupal\layout_builder

Code

public function appendComponent(SectionComponent $component) {
    $component->setWeight($this->getNextHighestWeight($component->getRegion()));
    $this->setComponent($component);
    return $this;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal