You are here

function hook_simplenews_subscription_operations in Simplenews 3.x

Same name and namespace in other branches
  1. 8.2 simplenews.api.php \hook_simplenews_subscription_operations()
  2. 8 simplenews.api.php \hook_simplenews_subscription_operations()
  3. 7.2 simplenews.api.php \hook_simplenews_subscription_operations()
  4. 7 simplenews.api.php \hook_simplenews_subscription_operations()

Return operations to be applied to subscriptions.

Related topics

File

./simplenews.api.php, line 88
Hooks provided by the Simplenews module.

Code

function hook_simplenews_subscription_operations() {
  $operations = [
    'activate' => [
      'label' => t('Activate'),
      'callback' => 'simplenews_subscription_activate',
      'callback arguments' => [
        SubscriberInterface::ACTIVE,
      ],
    ],
    'inactivate' => [
      'label' => t('Inactivate'),
      'callback' => 'simplenews_subscription_activate',
      'callback arguments' => [
        SubscriberInterface::INACTIVE,
      ],
    ],
    'delete' => [
      'label' => t('Delete'),
      'callback' => 'simplenews_subscription_delete_multiple',
    ],
  ];
  return $operations;
}