open-orchestra/open-orchestra-cms-bundle

View on GitHub
BackofficeBundle/Resources/public/ecmascript/OpenOrchestra/Service/DataFormatter/AbstractDataFormatter.js

Summary

Maintainability
A
0 mins
Test Coverage
/**
 * @class AbstractDataFormatter
 */
class AbstractDataFormatter
{
    /**
     * return supported type
     *
     * @return string
     */
    getType() {
        throw new Error('Missing getType method');
    }

    /**
     * render the field
     *
     * @param   {string} value
     * @returns {string}
     */
    format(value) {
        throw new Error('Missing format method');
    }
}

export default AbstractDataFormatter;