Revision #5 was created by le_top on Oct 22, 2014, 8:54:23 PM.
Improvement for default value with template, and abstract class for the property.
Content
[...]
/**
* Provides an instance providing a user property when called.
*
* @param string $property Same as second parameter in CHtml::value
* @param string $default Default value, evaluated as PHP code (inside string, so null must be written as "null").
* @param string $template If provided '{val}' in the template is replaced with the User property.
* @return mixed_UserProperty Property returned by User model or default if null or empty string.
*/
public static function getProperty($property,$default=null,$template=null) {