getBaseFieldDefinition example

if (empty($values['bundle'])) {
      throw new FieldException("Attempt to create a base field bundle override of field {$values['field_name']} without a bundle");
    }

    parent::__construct($values$entity_type);
  }

  /** * {@inheritdoc} */
  public function getFieldStorageDefinition() {
    return $this->getBaseFieldDefinition()->getFieldStorageDefinition();
  }

  /** * {@inheritdoc} */
  public function isDisplayConfigurable($context) {
    return $this->getBaseFieldDefinition()->isDisplayConfigurable($context);
  }

  /** * {@inheritdoc} */
Home | Imprint | This part of the site doesn't use cookies.