Changeset 17003
- Timestamp:
- 07/30/08 13:48:09 (4 months ago)
- Files:
-
- trunk/midcom/midcom.helper.datamanager2/datamanager.php (modified) (1 diff)
- trunk/midcom/midcom.helper.datamanager2/type.php (modified) (1 diff)
- trunk/midcom/midcom.helper.datamanager2/type/boolean.php (modified) (1 diff)
- trunk/midcom/net.nemein.registrations/event.php (modified) (1 diff)
- trunk/midcom/net.nemein.registrations/registration.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/midcom.helper.datamanager2/datamanager.php
r16513 r17003 386 386 387 387 /** 388 * Little helper function returning an associative array of all field values converted to email-friendly format 389 * using their default convert_to_email option. 390 * 391 * @return Array All field values in their CSV representation indexed by their name. 392 */ 393 function get_content_email() 394 { 395 $result = Array(); 396 foreach ($this->schema->field_order as $name) 397 { 398 $result[$name] = $this->types[$name]->convert_to_email(); 399 } 400 return $result; 401 } 402 403 /** 388 404 * Little helper function returning an associative array of all field values converted to 389 405 * their raw storage representation.. trunk/midcom/midcom.helper.datamanager2/type.php
r15253 r17003 212 212 213 213 /** 214 * Transforms the current object's state into a email-friendly string representation. 215 * 216 * Escaping and other encoding is done by the caller, you just return the string. 217 * 218 * If this method is not overwritten, convert_to_csv will be used instead. 219 * 220 * @return mixed The data to store into the object, or null on failure. 221 */ 222 function convert_to_email() 223 { 224 return $this->convert_to_csv(); 225 } 226 227 /** 214 228 * Transforms the current object's state into HTML representation. 215 229 * trunk/midcom/midcom.helper.datamanager2/type/boolean.php
r14329 r17003 100 100 } 101 101 102 function convert_to_email() 103 { 104 if ($this->value) 105 { 106 return $_MIDCOM->i18n->get_string('yes', 'midcom.helper.datamanager2'); 107 } 108 else 109 { 110 return $_MIDCOM->i18n->get_string('no', 'midcom.helper.datamanager2'); 111 } 112 } 113 102 114 /** 103 115 * The HTML representation returns either the configured texts or a trunk/midcom/net.nemein.registrations/event.php
r16858 r17003 934 934 935 935 $result .= $this->_l10n->get($field['title']) . ":\n"; 936 $data = $dm->types[$name]->convert_to_ csv();936 $data = $dm->types[$name]->convert_to_email(); 937 937 $result .= " " . wordwrap ($data, 70, "\n "); 938 938 $result .= "\n\n"; trunk/midcom/net.nemein.registrations/registration.php
r16858 r17003 216 216 217 217 $registration_dm =& $this->_request_data['registration_dm']; 218 $registration_data = $registration_dm->get_content_ csv();218 $registration_data = $registration_dm->get_content_email(); 219 219 $registration_all = net_nemein_registrations_event::dm_array_to_string($registration_dm); 220 220
