public static function displayName($propertyName) {
        $propertyName = (is_array($propertyName) ? implode('_', $propertyName) : $propertyName);

        if (($dataAnnotation = self::$viewContext->getModelDataAnnotation($propertyName)) !== null) {
            return htmlspecialchars($dataAnnotation->displayName);
        }
        else {
            return '';
        }
    }
public static function displayName($propertyName) {
        $propertyName = (is_array($propertyName) ? implode('_', $propertyName) : $propertyName);

        if (($dataAnnotation = self::$viewContext->getModelDataAnnotation($propertyName)) !== null) {
            return htmlspecialchars($dataAnnotation->displayName);
        }
        else {
            return '';
        }
    }
public static function displayName ( $ propertyName ) { $ propertyName = ( is_array ( $ propertyName ) ? implode ( '_' , $ propertyName ) : $ propertyName ) ; if ( ( $ dataAnnotation = self :: $ viewContext -> getModelDataAnnotation ( $ propertyName ) ) !== null ) { return htmlspecialchars ( $ dataAnnotation -> displayName ) ; } else { return '' ; } }
Gets display name for the specified field.

@param string|array $propertyName The name of the property to display the name.
It can be a string or an array.
If an array is specified, the property chain in the model will be searched.
For example: array('A', 'B') is $model->A->B.

@return string
Gets display name for the specified field .