You are here

function sendinblue_block_info in SendinBlue 7

Same name and namespace in other branches
  1. 7.2 sendinblue.module \sendinblue_block_info()

Implements hook_block_info().

File

./sendinblue.module, line 172
The entry point of Sendinblue module.

Code

function sendinblue_block_info() {
  $blocks = array();
  $signups = sendinblue_signup_load_multiple();
  foreach ($signups as $signup) {
    if (intval($signup->mode) == SENDINBLUE_SIGNUP_BLOCK || intval($signup->mode) == SENDINBLUE_SIGNUP_BOTH) {
      $blocks[$signup
        ->identifier()] = array(
        'info' => t('SendinBlue Subscription Form: @name', array(
          '@name' => $signup
            ->label(),
        )),
        'cache' => DRUPAL_CACHE_PER_USER,
      );
    }
  }
  return $blocks;
}