Skip to content

Commit

Permalink
Merge pull request #6 from qadan/coding-standards
Browse files Browse the repository at this point in the history
first pass at coding standards overhaul
  • Loading branch information
JojoVes authored Jul 24, 2020
2 parents f1598e4 + 19c563b commit f8a3714
Show file tree
Hide file tree
Showing 39 changed files with 2,267 additions and 665 deletions.
4 changes: 4 additions & 0 deletions config/install/embargoes.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
embargo_contact_email: null
add_contact_to_notifications: true
show_embargo_message: true
80 changes: 80 additions & 0 deletions config/schema/embargoes.schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,83 @@ condition.plugin.embargoes_embargoed_condition:
filter:
type: text
label: 'Embargo Filter'

embargoes.settings:
type: config_object
mapping:
embargo_contact_email:
type: email
label: 'Contact email for embargo notifications'
add_contact_to_notifications:
type: boolean
label: 'Whether to add contact information to embargo notifications'
show_embargo_message:
type: boolean
label: 'Whether to display an embargo warning on embargoed nodes'

embargoes.embargoes_embargo_entity.*:
type: config_entity
label: 'Embargo config'
mapping:
id:
type: string
label: 'ID'
embargo_type:
type: boolean
label: 'Embargo Type'
expiration_type:
type: boolean
label: 'Expiration Type'
expiration_date:
type: string
label: 'Expiration Date'
exempt_ips:
type: string
label: 'Exempt IP Ranges'
nullable: true
exempt_users:
type: sequence
label: 'Exempt Users'
sequence:
type: mapping
mapping:
target_id:
type: integer
additional_emails:
type: sequence
label: 'Additional Emails'
sequence:
type: mapping
mapping:
additional_email:
type: string
embargoed_node:
type: integer
label: 'Embargoed Node'
notification_status:
type: string
label: 'Notification Status'

embargoes.embargoes_ip_range_entity.*:
type: config_entity
label: 'IP Range config'
mapping:
id:
type: string
label: 'ID'
label:
type: label
label: 'Label'
ranges:
type: sequence
label: 'Ranges'
sequence:
type: mapping
mapping:
range:
type: string
proxy_url:
type: string
label: 'Proxy URL'
uuid:
type: string
36 changes: 0 additions & 36 deletions config/schema/embargoes_embargo_entity.schema.yml

This file was deleted.

18 changes: 0 additions & 18 deletions config/schema/embargoes_ip_range_entity.schema.yml

This file was deleted.

14 changes: 7 additions & 7 deletions embargoes.install
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

use Drupal\Core\Database\Database;

/**
* @file
* Install, update and uninstall functions for the embargoes module.
*/
* @file
* Install, update and uninstall functions for the embargoes module.
*/

use Drupal\Core\Database\Database;

/**
* Implements hook_schema().
*/
* Implements hook_schema().
*/
function embargoes_schema() {
$schema['embargoes_log'] = [
'description' => 'Embargo log table.',
Expand Down
7 changes: 0 additions & 7 deletions embargoes.libraries.yml

This file was deleted.

Loading

0 comments on commit f8a3714

Please sign in to comment.