You are here

public function EntityExtraField::hasDisplayComponent in Entity Extra Field 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/EntityExtraField.php \Drupal\entity_extra_field\Entity\EntityExtraField::hasDisplayComponent()

Extra field has display component.

Parameters

\Drupal\Core\Entity\Display\EntityDisplayInterface $display: An entity display to check for the extra field.

Return value

bool Return TRUE if the component exists in the display; otherwise FALSE.

Overrides EntityExtraFieldInterface::hasDisplayComponent

File

src/Entity/EntityExtraField.php, line 296

Class

EntityExtraField
Define entity extra field.

Namespace

Drupal\entity_extra_field\Entity

Code

public function hasDisplayComponent(EntityDisplayInterface $display) {
  return $display
    ->getComponent($this
    ->name()) !== NULL;
}