企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
#``constant`` > versionadded: 1.12.1 constant now accepts object instances as the second argument. ``constant`` returns the constant value for a given string: {{ some_date|date(constant('DATE_W3C')) }} {{ constant('Namespace\\Classname::CONSTANT_NAME') }} As of 1.12.1 you can read constants from object instances as well: {{ constant('RSS', date) }}