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

Breadcrumb

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

function ContentEntityBase::getFieldDefinition

3 calls to ContentEntityBase::getFieldDefinition()
ContentEntityBase::getEntityKey in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Gets the value of the given entity key, if defined.
ContentEntityBase::getTranslatedField in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Gets a translated field.
ContentEntityBase::hasField in core/lib/Drupal/Core/Entity/ContentEntityBase.php

File

core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 697

Class

ContentEntityBase
Implements Entity Field API specific enhancements to the Entity class.

Namespace

Drupal\Core\Entity

Code

public function getFieldDefinition($name) {
    if (!isset($this->fieldDefinitions)) {
        $this->getFieldDefinitions();
    }
    if (isset($this->fieldDefinitions[$name])) {
        return $this->fieldDefinitions[$name];
    }
}

API Navigation

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