public static function display($modelType, $propertyName, $name, $text = null) {
        if (!self::canAnnotate($modelType)) {
            return;
        }

        if (empty($propertyName)) {
            throw new \Exception('$propertyName must not be empty.');
        }

        self::makeDataAnnotation($propertyName);

        self::$annotations[$propertyName]->displayName = $name;
        self::$annotations[$propertyName]->displayText = $text;
    }
public static function display($modelType, $propertyName, $name, $text = null) {
        if (!self::canAnnotate($modelType)) {
            return;
        }

        if (empty($propertyName)) {
            throw new \Exception('$propertyName must not be empty.');
        }

        self::makeDataAnnotation($propertyName);

        self::$annotations[$propertyName]->displayName = $name;
        self::$annotations[$propertyName]->displayText = $text;
    }
public static function display ( $ modelType , $ propertyName , $ name , $ text = null ) { if ( ! self :: canAnnotate ( $ modelType ) ) { return ; } if ( empty ( $ propertyName ) ) { throw new \ Exception ( '$propertyName must not be empty.' ) ; } self :: makeDataAnnotation ( $ propertyName ) ; self :: $ annotations [ $ propertyName ] -> displayName = $ name ; self :: $ annotations [ $ propertyName ] -> displayText = $ text ; }
Sets a values that is used for display in the UI.

@param string|object $modelType The name type of model.
@param string $propertyName The property name to set.
@param string $name The value that is used for display in the UI.
@param string $text The value that is used to display a description in the UI.

@return void
Sets a values that is used for display in the UI .