diff --git a/modules/core/notification/farm_notification.info.yml b/modules/core/notification/farm_notification.info.yml new file mode 100644 index 000000000..06f687045 --- /dev/null +++ b/modules/core/notification/farm_notification.info.yml @@ -0,0 +1,5 @@ +name: farmOS Notification +description: Provides farmOS notification features. +type: module +package: farmOS +core_version_requirement: ^9 diff --git a/modules/core/notification/farm_notification.links.task.yml b/modules/core/notification/farm_notification.links.task.yml new file mode 100644 index 000000000..1e4c86d20 --- /dev/null +++ b/modules/core/notification/farm_notification.links.task.yml @@ -0,0 +1,12 @@ +farm_notification.settings: + base_route: farm_settings.settings_page + route_name: farm_notification.settings + title: 'Notifications' + weight: 5 + +# Provide a default sub tab. +farm_notification.settings_sub: + title: 'Notifications' + route_name: farm_notification.settings + parent_id: farm_notification.settings + weight: -5 diff --git a/modules/core/notification/farm_notification.managed_role_permissions.yml b/modules/core/notification/farm_notification.managed_role_permissions.yml new file mode 100644 index 000000000..3d1003cfb --- /dev/null +++ b/modules/core/notification/farm_notification.managed_role_permissions.yml @@ -0,0 +1,3 @@ +farm_notification: + config_permissions: + - administer farm notification diff --git a/modules/core/notification/farm_notification.permissions.yml b/modules/core/notification/farm_notification.permissions.yml new file mode 100644 index 000000000..8ce3d2aef --- /dev/null +++ b/modules/core/notification/farm_notification.permissions.yml @@ -0,0 +1,2 @@ +administer farm notification: + title: 'Administer farmOS notifications' diff --git a/modules/core/notification/farm_notification.routing.yml b/modules/core/notification/farm_notification.routing.yml new file mode 100644 index 000000000..69647b8cf --- /dev/null +++ b/modules/core/notification/farm_notification.routing.yml @@ -0,0 +1,7 @@ +farm_notification.settings: + path: '/farm/settings/notification' + defaults: + _form: '\Drupal\farm_notification\Form\NotificationSettingsForm' + _title: 'Notification settings' + requirements: + _permission: 'administer farm notification' diff --git a/modules/core/notification/src/Form/NotificationSettingsForm.php b/modules/core/notification/src/Form/NotificationSettingsForm.php new file mode 100644 index 000000000..83f3ca0ba --- /dev/null +++ b/modules/core/notification/src/Form/NotificationSettingsForm.php @@ -0,0 +1,41 @@ + 'markup', + '#markup' => $this->t('Select the tab for the type of notification to configure. Notification modules can add additional tabs to this page.'), + ]; + + return $form; + } + + /** + * {@inheritdoc} + */ + public function submitForm(array &$form, FormStateInterface $form_state) { + + } + +}