You are here

class UserDeveloperConversionNoStorageFormatterFoundException in Apigee Edge 8

Thrown when no storage formatter found for a user field.

Hierarchy

Expanded class hierarchy of UserDeveloperConversionNoStorageFormatterFoundException

4 files declare their use of UserDeveloperConversionNoStorageFormatterFoundException
apigee_edge.module in ./apigee_edge.module
Copyright 2018 Google Inc.
DeveloperCreateUpdate.php in src/Job/DeveloperCreateUpdate.php
UserCreateUpdate.php in src/Job/UserCreateUpdate.php
UserDeveloperConverter.php in src/UserDeveloperConverter.php

File

src/Exception/UserDeveloperConversionNoStorageFormatterFoundException.php, line 28

Namespace

Drupal\apigee_edge\Exception
View source
class UserDeveloperConversionNoStorageFormatterFoundException extends UserDeveloperConversionException {

  /**
   * Type of field with no formatter available.
   *
   * @var \Drupal\Core\Field\FieldDefinitionInterface
   */
  protected $fieldDefinition;

  /**
   * UserDeveloperConversionNoStorageFormatterFoundException constructor.
   *
   * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
   *   Field definition.
   * @param string $message
   *   Exception message.
   * @param int|null $code
   *   Error code.
   * @param \Throwable|null $previous
   *   Previous exception.
   */
  public function __construct(FieldDefinitionInterface $field_definition, string $message = 'No available storage formatter found for "@field_type" field type.', ?int $code = NULL, ?\Throwable $previous = NULL) {
    $message = strtr($message, [
      '@field_type' => $field_definition
        ->getType(),
    ]);
    $this->fieldDefinition = $field_definition;
    parent::__construct($message, $code, $previous);
  }

  /**
   * Returns the definition of the problematic field.
   *
   * @return \Drupal\Core\Field\FieldDefinitionInterface
   *   Defition of the field.
   */
  public function getFieldDefinition() : FieldDefinitionInterface {
    return $this->fieldDefinition;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
UserDeveloperConversionNoStorageFormatterFoundException::$fieldDefinition protected property Type of field with no formatter available.
UserDeveloperConversionNoStorageFormatterFoundException::getFieldDefinition public function Returns the definition of the problematic field.
UserDeveloperConversionNoStorageFormatterFoundException::__construct public function UserDeveloperConversionNoStorageFormatterFoundException constructor.