You are here

function dfp_context_reaction_tags::options_form in Doubleclick for Publishers (DFP) 7.2

Same name and namespace in other branches
  1. 7 plugins/contexts/dfp_context_reaction_tags.inc \dfp_context_reaction_tags::options_form()

Allow admins to choose what DFP tags to hide.

Overrides context_reaction::options_form

File

plugins/contexts/dfp_context_reaction_tags.inc, line 15
Context reaction plugin for DFP ads.

Class

dfp_context_reaction_tags
Expose DFP tags as context reactions.

Code

function options_form($context) {

  // Get existing values for this form.
  $values = $this
    ->fetch_from_context($context);

  // Get a list of all DART tags.
  $options = array();
  $tags = dfp_tag_load_all();
  foreach ($tags as $tag) {
    $options[$tag->machinename] = $tag->slot;
  }
  $form = array(
    '#title' => t('Hide these DFP tags'),
    '#description' => t('The following DFP tags will not be displayed.'),
    '#type' => 'checkboxes',
    '#options' => $options,
    '#default_value' => isset($values) ? $values : array(),
  );
  return $form;
}