public function LayoutParagraphsSection::getComponentByUuid in Layout Paragraphs 2.0.x
Returns the child component with matching uuid.
Parameters
string $uuid: The uuid to search for.
Return value
LayoutParagraphsComponent The component.
File
- src/
LayoutParagraphsSection.php, line 68
Class
- LayoutParagraphsSection
- Provides a domain object for a Layout Paragraphs Section.
Namespace
Drupal\layout_paragraphsCode
public function getComponentByUuid($uuid) {
foreach ($this
->getComponents() as $component) {
if ($component
->getEntity()
->uuid() == $uuid) {
return $component;
}
}
}