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

Breadcrumb

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

function FieldItemBase::__get

Overrides FieldItemInterface::__get

2 calls to FieldItemBase::__get()
LayoutSectionItem::__get in core/modules/layout_builder/src/Plugin/Field/FieldType/LayoutSectionItem.php
Magic method: Gets a property value.
LayoutSectionItem::__get in core/modules/layout_builder/src/Plugin/Field/FieldType/LayoutSectionItem.php
Magic method: Gets a property value.
2 methods override FieldItemBase::__get()
LayoutSectionItem::__get in core/modules/layout_builder/src/Plugin/Field/FieldType/LayoutSectionItem.php
Magic method: Gets a property value.
MapItem::__get in core/lib/Drupal/Core/Field/Plugin/Field/FieldType/MapItem.php
Magic method: Gets a property value.

File

core/lib/Drupal/Core/Field/FieldItemBase.php, line 150

Class

FieldItemBase
An entity field item.

Namespace

Drupal\Core\Field

Code

public function __get($name) {
    // There is either a property object or a plain value - possibly for a
    // not-defined property. If we have a plain value, directly return it.
    if (isset($this->properties[$name])) {
        return $this->properties[$name]
            ->getValue();
    }
    elseif (isset($this->values[$name])) {
        return $this->values[$name];
    }
}

API Navigation

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