You are here

function hook_simplenews_subscription_operations in Simplenews 8

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

Return operations to be applied to subscriptions.

Related topics

File

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

Code

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