summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormicropat2016-09-02 23:40:26 -0700
committermicropat2016-09-02 23:40:26 -0700
commit95056b254be48fd65857385798897a16d0c3cd17 (patch)
tree7032836b16176c668564208c76f5969f6e72f45d
parent22ea0d02e709cad7bc60d6e0643bc42a0e8dfe7d (diff)
Replace addtoany_permission() with .yml file
Drupal 8 replaced hook_permission() with permissions defined in a $module.permissions.yml file (change record #2311427)
-rw-r--r--addtoany.module12
-rw-r--r--addtoany.permissions.yml4
2 files changed, 4 insertions, 12 deletions
diff --git a/addtoany.module b/addtoany.module
index 699b15b..595bea1 100644
--- a/addtoany.module
+++ b/addtoany.module
@@ -12,18 +12,6 @@ use Drupal\Component\Utility\Html;
use Drupal\Component\Utility\UrlHelper;
/**
- * Implements hook_permission().
- */
-function addtoany_permission() {
- return array(
- 'administer addtoany' => array(
- 'title' => t('Administer addtoany'),
- 'description' => t('Perform administration tasks for the AddToAny module.'),
- ),
- );
-}
-
-/**
* Implements hook_theme().
*/
function addtoany_theme() {
diff --git a/addtoany.permissions.yml b/addtoany.permissions.yml
new file mode 100644
index 0000000..6b8be1e
--- /dev/null
+++ b/addtoany.permissions.yml
@@ -0,0 +1,4 @@
+# Permissions for the addtoany module
+'administer addtoany':
+ title: 'Administer AddToAny'
+ description: 'Perform administration tasks for the AddToAny module.'