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

Breadcrumb

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

function LayoutDefinition::set

Sets a value to an arbitrary property.

Parameters

string $property: The property to use for the value.

mixed $value: The value to set.

Return value

$this

1 call to LayoutDefinition::set()
LayoutDefinition::__construct in core/lib/Drupal/Core/Layout/LayoutDefinition.php
LayoutDefinition constructor.

File

core/lib/Drupal/Core/Layout/LayoutDefinition.php, line 182

Class

LayoutDefinition
Provides an implementation of a layout definition and its metadata.

Namespace

Drupal\Core\Layout

Code

public function set($property, $value) {
    if (property_exists($this, $property)) {
        $this->{$property} = $value;
    }
    else {
        $this->additional[$property] = $value;
    }
    return $this;
}

API Navigation

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