diff --git a/core/modules/shortcut/shortcut.install b/core/modules/shortcut/shortcut.install index 6c6917f..7f0c19d 100644 --- a/core/modules/shortcut/shortcut.install +++ b/core/modules/shortcut/shortcut.install @@ -9,105 +9,6 @@ * Implements hook_schema(). */ function shortcut_schema() { - $schema['shortcut'] = array( - 'description' => 'Stores shortcut items.', - 'fields' => array( - 'id' => array( - 'type' => 'serial', - 'not null' => TRUE, - 'description' => 'Primary Key: Unique shortcut ID.', - ), - 'uuid' => array( - 'type' => 'varchar', - 'length' => 128, - 'not null' => FALSE, - 'description' => 'Unique Key: Universally unique identifier for this shortcut.', - ), - 'shortcut_set' => array( - 'type' => 'varchar', - 'length' => 32, - 'not null' => TRUE, - 'default' => '', - 'description' => 'The bundle of the shortcut.', - ), - 'langcode' => array( - 'type' => 'varchar', - 'length' => 12, - 'not null' => TRUE, - 'default' => '', - 'description' => 'The {language}.langcode of the original variant of this shortcut.', - ), - 'weight' => array( - 'description' => 'Weight among shortcuts in the same shortcut set.', - 'type' => 'int', - 'not null' => TRUE, - 'default' => 0, - ), - 'link__route_name' => array( - 'description' => 'The machine name of a defined Route this link represents.', - 'type' => 'varchar', - 'length' => 255, - 'not null' => FALSE, - ), - 'link__route_parameters' => array( - 'description' => 'Serialized array of route parameters of the link.', - 'type' => 'blob', - 'size' => 'big', - 'not null' => FALSE, - 'serialize' => TRUE, - ), - 'link__options' => array( - 'description' => 'Serialized array of options for the link.', - 'type' => 'blob', - 'size' => 'big', - 'not null' => FALSE, - 'serialize' => TRUE, - ), - ), - 'primary key' => array('id'), - 'unique keys' => array( - 'uuid' => array('uuid'), - ), - ); - - $schema['shortcut_field_data'] = array( - 'description' => 'Stores shortcut properties.', - 'fields' => array( - 'id' => array( - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - 'description' => 'The {shortcut}.id of the shortcut.', - ), - 'langcode' => array( - 'type' => 'varchar', - 'length' => 12, - 'not null' => TRUE, - 'default' => '', - 'description' => 'The {language}.langcode of this variant of this shortcut.', - ), - 'default_langcode' => array( - 'type' => 'int', - 'not null' => TRUE, - 'default' => 1, - 'description' => 'Boolean indicating whether the current variant is in the original entity language.', - ), - 'title' => array( - 'type' => 'varchar', - 'length' => 32, - 'not null' => FALSE, - 'description' => 'The title of the shortcut.', - ), - ), - 'foreign keys' => array( - 'shortcut' => array( - 'table' => 'shortcut', - 'columns' => array('id' => 'id'), - ), - ), - 'primary key' => array('id', 'langcode'), - ); - $schema['shortcut_set_users'] = array( 'description' => 'Maps users to shortcut sets.', 'fields' => array( diff --git a/core/modules/shortcut/src/Entity/Shortcut.php b/core/modules/shortcut/src/Entity/Shortcut.php index 65c687a..6b95e32 100644 --- a/core/modules/shortcut/src/Entity/Shortcut.php +++ b/core/modules/shortcut/src/Entity/Shortcut.php @@ -206,20 +206,6 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { ->setLabel(t('Language code')) ->setDescription(t('The language code of the shortcut.')); - $fields['path'] = FieldDefinition::create('string') - ->setLabel(t('Path')) - ->setDescription(t('The computed shortcut path.')) - ->setComputed(TRUE) - ->setCustomStorage(TRUE); - - $item_definition = $fields['path']->getItemDefinition(); - $item_definition->setClass('\Drupal\shortcut\ShortcutPathItem'); - $fields['path']->setItemDefinition($item_definition); - - $fields['default_langcode'] = FieldDefinition::create('boolean') - ->setLabel(t('Default language')) - ->setDescription(t('Flag to indicate whether this is the default language.')); - return $fields; }