| 1 |
<?php |
<?php |
| 2 |
// $Id: computed_field.module,v 1.16 2008/04/22 01:07:49 nterbogt Exp $ |
// $Id: computed_field.module,v 1.17.2.3 2008/09/29 04:08:21 moonshine Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of cck hook_field_info() |
* Implementation of cck hook_field_info() |
| 40 |
$form['display_format'] = array( |
$form['display_format'] = array( |
| 41 |
'#type' => 'textarea', |
'#type' => 'textarea', |
| 42 |
'#title' => t('Display Format'), |
'#title' => t('Display Format'), |
| 43 |
'#description' => t('This code should assign a string to the $display variable, which will be printed as the value of the field. The stored value of the field is in $node_field_item[\'value\']. Note: this code has no effect if you use the "Raw Value" formatter option.'), |
'#description' => t('This code should assign a string to the $display variable, which will be printed as the value of the field. The stored value of the field is in $node_field_item[\'value\']. Note: this code has no effect if you use the "Computed Value" formatter option.'), |
| 44 |
'#default_value' => !empty($field['display_format']) ? $field['display_format'] : '$display = $node_field_item[\'value\'];', |
'#default_value' => !empty($field['display_format']) ? $field['display_format'] : '$display = $node_field_item[\'value\'];', |
| 45 |
); |
); |
| 46 |
$form['store'] = array( |
$form['store'] = array( |
| 127 |
$table_alias = content_views_tablename($field); |
$table_alias = content_views_tablename($field); |
| 128 |
|
|
| 129 |
// Swap the filter handler to the 'in' operator. |
// Swap the filter handler to the 'in' operator. |
| 130 |
$data[$table_alias][$field['field_name'] .'_value']['filter']['handler'] = 'views_handler_filter_many_to_one_content'; |
$data[$table_alias][$field['field_name'] .'_value']['filter']['handler'] = 'content_handler_filter_many_to_one'; |
| 131 |
return $data; |
return $data; |
| 132 |
} |
} |
| 133 |
} |
} |
| 227 |
'computed_field_formatter_markup' => array( |
'computed_field_formatter_markup' => array( |
| 228 |
'arguments' => array('element' => NULL), |
'arguments' => array('element' => NULL), |
| 229 |
), |
), |
| 230 |
'computed_field_formatter_raw_value' => array( |
'computed_field_formatter_computed_value' => array( |
| 231 |
'arguments' => array('element' => NULL), |
'arguments' => array('element' => NULL), |
| 232 |
), |
), |
| 233 |
); |
); |