You are here

dfp.module in Doubleclick for Publishers (DFP) 8

Same filename and directory in other branches
  1. 7.2 dfp.module
  2. 7 dfp.module

The DFP module.

File

dfp.module
View source
<?php

/**
 * @file
 * The DFP module.
 */
use Drupal\Core\Routing\RouteMatchInterface;

/**
 * Implements hook_help().
 */
function dfp_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.dfp':
      $output = '<p>' . t('The Doubleclick For Publishers (DFP) module allows you to integrate Google Publisher Tags onto your site.') . '</p>';
      $output .= '<p>' . t('This module provides you with a general settings form as well as the ability to create a tag (with all its associated data) in the database. You can display your ads as blocks, or add a simple bit of php to your tpl.php file(s) within your theme to indicate where specific tags should be displayed.') . '</p>';
      return $output;
  }
}

/**
 * Implements hook_theme().
 */
function dfp_theme() {
  return [
    'dfp_tag' => [
      'variables' => [
        'tag' => NULL,
      ],
    ],
    'dfp_short_tag' => [
      'variables' => [
        'tag' => NULL,
        'url_jump' => NULL,
        'url_ad' => NULL,
      ],
    ],
    'dfp_js_head_top' => [
      'variables' => [
        'google_tag_services_url' => NULL,
      ],
    ],
    'dfp_js_head_bottom' => [
      'variables' => [
        'async_rendering' => NULL,
        'single_request' => NULL,
        'collapse_empty_divs' => NULL,
        'disable_init_load' => NULL,
        'targeting' => [],
      ],
    ],
    'dfp_slot_definition_js' => [
      'variables' => [
        'tag' => NULL,
      ],
    ],
  ];
}

Functions

Namesort descending Description
dfp_help Implements hook_help().
dfp_theme Implements hook_theme().