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

Breadcrumb

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

function FieldableEntityInterface::hasField

Determines whether the entity has a field with the given name.

Parameters

string $field_name: The field name.

Return value

bool TRUE if the entity has a field with the given name. FALSE otherwise.

File

core/lib/Drupal/Core/Entity/FieldableEntityInterface.php, line 105

Class

FieldableEntityInterface
Interface for entities having fields.

Namespace

Drupal\Core\Entity

Code

public function hasField($field_name);

API Navigation

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