You are here

function nodequeue_handler_relationship_nodequeue::init in Nodequeue 7.2

Same name and namespace in other branches
  1. 7.3 includes/views/nodequeue_handler_relationship_nodequeue.inc \nodequeue_handler_relationship_nodequeue::init()

Init handler to let relationships live on tables other than the table they operate on.

Overrides views_handler_relationship::init

File

includes/views/nodequeue_handler_relationship_nodequeue.inc, line 12
Specialized relationship handler to add nodequeues.

Class

nodequeue_handler_relationship_nodequeue
@file Specialized relationship handler to add nodequeues.

Code

function init(&$view, &$options) {
  parent::init($view, $options);

  // Tranlate an older setting which was using qids instead of machine names.
  if (!empty($options['qids'])) {
    $map = array_flip(nodequeue_get_qid_map());
    foreach ($options['qids'] as $key => $value) {
      if ($value && isset($map[$key])) {
        $this->options['names'][$map[$key]] = $value ? $map[$key] : 0;
      }
    }
    unset($this->options['qids']);
  }
}