| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: content_plugin_style_php_array_ac.inc,v 1.1.2.3 2009/11/04 15:31:28 markuspetrux Exp $ 3 4 /** 5 * @file 6 * Handler for 'content_php_array_autocomplete' style. 7 */ 8 class content_plugin_style_php_array_ac extends views_plugin_style { 9 function render() { 10 $results = array(); 11 12 // Group the rows according to the grouping field, if specified. 13 $sets = $this->render_grouping($this->view->result, $this->options['grouping']); 14 15 $base_field = $this->view->base_field; 16 $title_field = $this->display->display_options['content_title_field']; 17 $title_field_alias = $this->view->field[$title_field]->field_alias; 18 19 // TODO : We don't display grouping info for now. 20 // Could be useful for select widget, though. 21 $this->view->row_index = 0; 22 foreach ($sets as $title => $records) { 23 foreach ($records as $label => $row) { 24 $results[$row->{$base_field}] = array( 25 'title' => $row->{$title_field_alias}, 26 'rendered' => $this->row_plugin->render($row), 27 ); 28 $this->view->row_index++; 29 } 30 } 31 unset($this->view->row_index); 32 return $results; 33 } 34 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |