You are here

public function ContentHubEntityLinkFieldHandler::__construct in Acquia Content Hub 8

ContentHubEntityEmbedHandler constructor.

Parameters

\Drupal\Core\Field\FieldItemListInterface|null $field: Drupal field object or NULL.

File

src/ContentHubEntityLinkFieldHandler.php, line 27

Class

ContentHubEntityLinkFieldHandler
Content Hub Entity Link Field.

Namespace

Drupal\acquia_contenthub

Code

public function __construct($field = NULL) {
  if ($field instanceof FieldItemListInterface && $field
    ->getFieldDefinition()
    ->getType() === 'link') {
    $this->field = $field;
  }
}