All Downloads are FREE. Search and download functionalities are using the official Maven repository.

php-symfony.model_enum.mustache Maven / Gradle / Ivy

There is a newer version: 7.8.0
Show newest version
class {{classname}}
{
    /**
     * Possible values of this enum
     */
    {{#allowableValues}}{{#enumVars}}const {{{name}}} = {{{value}}};
    {{/enumVars}}{{/allowableValues}}
    /**
     * Gets allowable values of the enum
     * @return string[]
     */
    public static function getAllowableEnumValues()
    {
        return [
            {{#allowableValues}}{{#enumVars}}self::{{{name}}},{{^-last}}
            {{/-last}}{{/enumVars}}{{/allowableValues}}
        ];
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy