Browse Source

Generated tables now

pull/756/head
Danny Lamb 8 years ago
parent
commit
28e8b7d723
  1. 7
      src/Entity/FedoraResource.php

7
src/Entity/FedoraResource.php

@ -39,9 +39,11 @@ use Drupal\user\UserInterface;
* data_table = "fedora_resource_field_data", * data_table = "fedora_resource_field_data",
* revision_table = "fedora_resource_revision", * revision_table = "fedora_resource_revision",
* revision_data_table = "fedora_resource_field_data_revision", * revision_data_table = "fedora_resource_field_data_revision",
* translatable = TRUE,
* admin_permission = "administer fedora resource entities", * admin_permission = "administer fedora resource entities",
* entity_keys = { * entity_keys = {
* "id" = "id", * "id" = "id",
* "revision" = "vid",
* "bundle" = "type", * "bundle" = "type",
* "label" = "name", * "label" = "name",
* "uuid" = "uuid", * "uuid" = "uuid",
@ -258,6 +260,11 @@ class FedoraResource extends ContentEntityBase implements FedoraResourceInterfac
->setLabel(t('ID')) ->setLabel(t('ID'))
->setDescription(t('The ID of the Fedora resource entity.')) ->setDescription(t('The ID of the Fedora resource entity.'))
->setReadOnly(TRUE); ->setReadOnly(TRUE);
$fields['vid'] = BaseFieldDefinition::create('integer')
->setLabel(t('Revision ID'))
->setDescription(t('The Fedora resource revision ID.'))
->setReadOnly(TRUE)
->setSetting('unsigned', TRUE);
$fields['type'] = BaseFieldDefinition::create('entity_reference') $fields['type'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('Type')) ->setLabel(t('Type'))
->setDescription(t('The Fedora resource type/bundle.')) ->setDescription(t('The Fedora resource type/bundle.'))

Loading…
Cancel
Save