Browse Source

Add a Collection bundle for FedoraResource

pull/756/head
Natkeeran 8 years ago
parent
commit
0b38ad67fd
  1. 14
      islandora_collection/composer.json
  2. 19
      islandora_collection/config/install/field.field.fedora_resource.collection.field_description.yml
  3. 19
      islandora_collection/config/install/field.field.fedora_resource.collection.field_memberof.yml
  4. 20
      islandora_collection/config/install/field.storage.fedora_resource.field_description.yml
  5. 21
      islandora_collection/config/install/field.storage.fedora_resource.field_memberof.yml
  6. 6
      islandora_collection/config/install/islandora.fedora_resource_type.collection.yml
  7. 44
      islandora_collection/config/install/rdf.mapping.fedora_resource_type.collection.yml
  8. 5
      islandora_collection/islandora_collection.info.yml
  9. 24
      islandora_collection/islandora_collection.module

14
islandora_collection/composer.json

@ -0,0 +1,14 @@
{
"name": "drupal/islandora_collection",
"type": "drupal-module",
"description": "Islandora Collection",
"keywords": ["Drupal"],
"license": "GPL-2.0+",
"homepage": "https://www.drupal.org/project/islandora_collection",
"minimum-stability": "dev",
"support": {
"issues": "http://drupal.org/project/issues/islandora_collection",
"source": "http://cgit.drupalcode.org/islandora_collection"
},
"require": { }
}

19
islandora_collection/config/install/field.field.fedora_resource.collection.field_description.yml

@ -0,0 +1,19 @@
langcode: en
status: true
dependencies:
config:
- field.storage.fedora_resource.field_description
- islandora.fedora_resource_type.collection
id: fedora_resource.collection.field_description
field_name: field_description
entity_type: fedora_resource
bundle: collection
label: description
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: string

19
islandora_collection/config/install/field.field.fedora_resource.collection.field_memberof.yml

@ -0,0 +1,19 @@
langcode: en
status: true
dependencies:
config:
- field.storage.fedora_resource.field_memberof
- islandora.fedora_resource_type.collection
id: fedora_resource.collection5.field_memberof
field_name: field_memberof
entity_type: fedora_resource
bundle: collection
label: memberOf
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: string

20
islandora_collection/config/install/field.storage.fedora_resource.field_description.yml

@ -0,0 +1,20 @@
langcode: en
status: true
dependencies:
module:
- islandora
id: fedora_resource.field_description
field_name: field_description
entity_type: fedora_resource
type: string
settings:
max_length: 255
is_ascii: false
case_sensitive: false
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

21
islandora_collection/config/install/field.storage.fedora_resource.field_memberof.yml

@ -0,0 +1,21 @@
langcode: en
status: true
dependencies:
module:
- islandora
id: fedora_resource.field_memberof
field_name: field_memberof
entity_type: fedora_resource
type: string
settings:
max_length: 255
is_ascii: false
case_sensitive: false
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

6
islandora_collection/config/install/islandora.fedora_resource_type.collection.yml

@ -0,0 +1,6 @@
langcode: en
status: true
dependencies: { }
id: collection
label: Collection

44
islandora_collection/config/install/rdf.mapping.fedora_resource_type.collection.yml

@ -0,0 +1,44 @@
langcode: en
status: true
dependencies:
config:
- islandora.fedora_resource_type.collection
module:
- islandora
id: fedora_resource_type.collection
targetEntityType: fedora_resource
bundle: collection
types:
- 'schema:Thing'
- 'ldp:RDFSource'
- 'ldp:Container'
fieldMappings:
description:
properties:
- 'dc:description'
memberof:
properties:
- 'dc:isPartOf'
title:
properties:
- 'dc:title'
- 'rdf:label'
created:
properties:
- 'schema:dateCreated'
datatype_callback:
callable: 'Drupal\rdf\CommonDataConverter::dateIso8601Value'
changed:
properties:
- 'schema:dateModified'
datatype_callback:
callable: 'Drupal\rdf\CommonDataConverter::dateIso8601Value'
rdf_type:
properties:
- 'rdf:type'
uid:
properties:
- 'schema:author'
mapping_type: rel

5
islandora_collection/islandora_collection.info.yml

@ -0,0 +1,5 @@
name: islandora_collection
type: module
description: Islandora Collection
core: 8.x
package: islandora

24
islandora_collection/islandora_collection.module

@ -0,0 +1,24 @@
<?php
/**
* @file
* Contains islandora_collection.module..
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function islandora_collection_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the islandora_collection module.
case 'help.page.islandora_collection':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Islandora Collection') . '</p>';
return $output;
default:
}
}
Loading…
Cancel
Save