| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: content_handler_argument_many_to_one.inc,v 1.1.2.4 2009/04/05 01:41:21 yched Exp $ 3 4 /** 5 * @file 6 * Handler for 'content_handler_argument_many_to_one' style. 7 */ 8 class content_handler_argument_many_to_one extends views_handler_argument_many_to_one { 9 var $content_field; 10 11 function construct() { 12 parent::construct(); 13 14 $this->content_field = content_fields($this->definition['content_field_name']); 15 $this->additional_fields = $this->definition['additional fields']; 16 } 17 18 function summary_name($data) { 19 $options = $this->allowed_values(); 20 $value = $data->{$this->name_alias}; 21 if (isset($options[$value])) { 22 $value = $options[$value]; 23 } 24 else { 25 $value = parent::summary_name($data); 26 } 27 28 return $value; 29 } 30 31 function title_query() { 32 $options = $this->allowed_values(); 33 $values = $this->value; 34 foreach ($values as $key => $value) { 35 if (isset($options[$value])) { 36 $values[$key] = $options[$value]; 37 } 38 } 39 return $values; 40 } 41 42 function allowed_values() { 43 $field = $this->content_field; 44 $function = $field['module'] .'_allowed_values'; 45 $options = function_exists($function) ? $function($field) : content_allowed_values($field); 46 return (array) $options; 47 } 48 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |