Skip to content

Commit

Permalink
Merge pull request d8-contrib-modules#81 from rlhawk/rlhawk-update-ro…
Browse files Browse the repository at this point in the history
…uting-and-menu-links

Updated routes and menu links to match Drupal patterns.
  • Loading branch information
nerdstein committed Feb 9, 2016
2 parents 7eb7c64 + 0bb6554 commit 8236dcc
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 22 deletions.
6 changes: 2 additions & 4 deletions encrypt.links.menu.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Title menu items definition
entity.encryption_profile.collection:
title: 'Encryption Profile'
title: 'Encryption profiles'
route_name: entity.encryption_profile.collection
description: 'Encryption Profile listing'
description: 'Manage profiles that can be used to encrypt and decrypt data.'
parent: system.admin_config_system

17 changes: 8 additions & 9 deletions encrypt.routing.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
# Encryption Profile routing definition
entity.encryption_profile.collection:
path: '/admin/config/system/encryption'
path: '/admin/config/system/encryption/profiles'
defaults:
_entity_list: 'encryption_profile'
_title: 'Encryption Profiles'
_title: 'Encryption profiles'
requirements:
_permission: 'administer encrypt'

entity.encryption_profile.add_form:
path: '/admin/config/system/encryption/profile/add'
path: '/admin/config/system/encryption/profiles/add'
defaults:
_entity_form: 'encryption_profile.add'
_title: 'Add Encryption Profile'
_title: 'Add encryption profile'
requirements:
_permission: 'administer encrypt'

entity.encryption_profile.edit_form:
path: '/admin/config/system/encryption/profile/{encryption_profile}'
path: '/admin/config/system/encryption/profiles/manage/{encryption_profile}'
defaults:
_entity_form: 'encryption_profile.edit'
_title: 'Edit Encryption Profile'
_title: 'Edit encryption profile'
requirements:
_permission: 'administer encrypt'

entity.encryption_profile.delete_form:
path: '/admin/config/system/encryption/profile/{encryption_profile}/delete'
path: '/admin/config/system/encryption/profiles/manage/{encryption_profile}/delete'
defaults:
_entity_form: 'encryption_profile.delete'
_title: 'Delete Encryption Profile'
_title: 'Delete encryption profile'
requirements:
_permission: 'administer encrypt'
2 changes: 1 addition & 1 deletion modules/encrypt_seclib/src/Tests/EncryptService.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function testEncryptAndDecrypt() {
'encryption_key' => 'testing_key',
'encryption_method' => 'phpseclib',
];
$this->drupalPostForm('admin/config/system/encryption/profile/add', $edit, t('Save'));
$this->drupalPostForm('admin/config/system/encryption/profiles/add', $edit, t('Save'));


// Test encryption service.
Expand Down
10 changes: 5 additions & 5 deletions src/Entity/EncryptionProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
* "uuid" = "uuid"
* },
* links = {
* "canonical" = "/admin/config/system/encryption/profile/{encryption_profile}",
* "add-form" = "/admin/config/system/encryption/profile/add",
* "edit-form" = "/admin/config/system/encryption/profile/{encryption_profile}/edit",
* "delete-form" = "/admin/config/system/encryption/profile/{encryption_profile}/delete",
* "collection" = "/admin/config/system/encryption/profile",
* "canonical" = "/admin/config/system/encryption/profiles/{encryption_profile}",
* "add-form" = "/admin/config/system/encryption/profiles/add",
* "edit-form" = "/admin/config/system/encryption/profiles/manage/{encryption_profile}",
* "delete-form" = "/admin/config/system/encryption/profiles/manage/{encryption_profile}/delete",
* "collection" = "/admin/config/system/encryption/profiles"
* }
* )
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/EncryptEncryptDecryptTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected function stageTest() {
$this->drupalPostForm(NULL, $edit, t('Save'));

// Setup an initial encryption profile and default it.
$this->drupalGet('admin/config/system/encryption/profile/add');
$this->drupalGet('admin/config/system/encryption/profiles/add');
$edit = [
'id' => 'testing_profile',
'label' => 'Testing profile',
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/EncryptEncryptionMethodPluginsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function setUp() {
* The declared encryption method appears on the add configuration page.
*/
public function testPluginsAppearInList() {
$this->drupalGet('admin/config/system/encryption/profile/add');
$this->drupalGet('admin/config/system/encryption/profiles/add');
// Check if the plugin exists.
$this->assertOption('edit-encryption-method', 'phpseclib', t('Encryption method option is present.'));
$this->assertText('PHP Secure Communications Library (phpseclib)', t('Encryption method text is present'));
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/EncryptService.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function testEncryptAndDecrypt() {
'encryption_key' => 'testing_key',
'encryption_method' => 'mcrypt_aes_256',
];
$this->drupalPostForm('admin/config/system/encryption/profile/add', $edit, t('Save'));
$this->drupalPostForm('admin/config/system/encryption/profiles/add', $edit, t('Save'));


// Test encryption service.
Expand Down

0 comments on commit 8236dcc

Please sign in to comment.