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

Breadcrumb

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

function Section::getComponent

Gets the component for a given UUID.

Parameters

string $uuid: The UUID of the component to retrieve.

Return value

\Drupal\layout_builder\SectionComponent The component.

Throws

\InvalidArgumentException Thrown when the expected UUID does not exist.

File

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

Class

Section
Provides a domain object for layout sections.

Namespace

Drupal\layout_builder

Code

public function getComponent($uuid) {
    if (!isset($this->components[$uuid])) {
        throw new \InvalidArgumentException(sprintf('Invalid UUID "%s"', $uuid));
    }
    return $this->components[$uuid];
}

API Navigation

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