checkStorageClass example

    $this->entity_keys += [
      'revision' => '',
      'bundle' => '',
      'langcode' => '',
      'default_langcode' => 'default_langcode',
      'revision_translation_affected' => 'revision_translation_affected',
    ];
    $this->handlers += [
      'access' => 'Drupal\Core\Entity\EntityAccessControlHandler',
    ];
    if (isset($this->handlers['storage'])) {
      $this->checkStorageClass($this->handlers['storage']);
    }

    // Automatically add the "EntityChanged" constraint if the entity type     // tracks the changed time.     if ($this->entityClassImplements(EntityChangedInterface::class)) {
      $this->addConstraint('EntityChanged');
    }
    // Automatically add the "EntityUntranslatableFields" constraint if we have     // an entity type supporting translatable fields and pending revisions.     if ($this->entityClassImplements(ContentEntityInterface::class)) {
      $this->addConstraint('EntityUntranslatableFields');
    }
Home | Imprint | This part of the site doesn't use cookies.