Development

Changeset 4751

You must first sign up to be able to contribute.

Changeset 4751

Show
Ignore:
Timestamp:
07/31/07 10:49:58 (1 year ago)
Author:
fabien
Message:

added magic method toString() in label_for() helper (closes #1939)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/helper/FormHelper.php

    r4386 r4751  
    854854  $options = _parse_attributes($options); 
    855855 
     856  if (is_object($label) && method_exists($label, '__toString')) 
     857  { 
     858    $label = $label->__toString(); 
     859  } 
     860 
    856861  return content_tag('label', $label, array_merge(array('for' => get_id_from_name($id, null)), $options)); 
    857862}