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

Breadcrumb

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

function ContentEntityBase::hasField

5 calls to ContentEntityBase::hasField()
ContentEntityBase::isRevisionTranslationAffected in core/lib/Drupal/Core/Entity/ContentEntityBase.php
ContentEntityBase::setDefaultLangcode in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Populates the local cache for the default language code.
ContentEntityBase::setRevisionTranslationAffected in core/lib/Drupal/Core/Entity/ContentEntityBase.php
ContentEntityBase::__isset in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Implements the magic method for isset().
ContentEntityBase::__unset in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Implements the magic method for unset().

File

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

Class

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

Namespace

Drupal\Core\Entity

Code

public function hasField($field_name) {
    return (bool) $this->getFieldDefinition($field_name);
}

API Navigation

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