You are here

public function FieldableEntityInterface::hasField in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/FieldableEntityInterface.php \Drupal\Core\Entity\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.

1 method overrides FieldableEntityInterface::hasField()
ContentEntityBase::hasField in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Determines whether the entity has a field with the given name.

File

core/lib/Drupal/Core/Entity/FieldableEntityInterface.php, line 110
Contains \Drupal\Core\Entity\FieldableEntityInterface.

Class

FieldableEntityInterface
Interface for entities having fields.

Namespace

Drupal\Core\Entity

Code

public function hasField($field_name);