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

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

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