final protected static function get_property_error_message($property) {
        $properties = static::properties_definition();
        if (!isset($properties[$property]['message'])) {
            return new lang_string('invaliddata', 'error');
        }
        return $properties[$property]['message'];
    }
final protected static function get_property_error_message($property) {
        $properties = static::properties_definition();
        if (!isset($properties[$property]['message'])) {
            return new lang_string('invaliddata', 'error');
        }
        return $properties[$property]['message'];
    }
final protected static function get_property_error_message ( $ property ) { $ properties = static :: properties_definition ( ) ; if ( ! isset ( $ properties [ $ property ] [ 'message' ] ) ) { return new lang_string ( 'invaliddata' , 'error' ) ; } return $ properties [ $ property ] [ 'message' ] ; }
Gets the error message for a property.

This assumes that the property exists.

@param string $property The property name.
@return lang_string
Gets the error message for a property .