= sfAdavancedConst plugin = The `sfAdvancedConstPlugin` is a symfony plugin that provides app wide constants functionality. It automatically generates constant values based on sfRefTable values and make them accessible in every app module. It works the following way - go through the tables defined in sfRefTable and generate for each id / name pair from this table constants. This plugin is different from sfConst plugin which required to keep all the constants directly in sfConst table and did not require ref tables. Effectively, both plugins are usefull to be used. == Installation == * Install the plugin {{{ symfony plugin-install http://plugins.symfony-project.com/sfAdvancedConstPlugin }}} * Enable module in your `settings.yml` * sfConst {{{ all: .settings: enabled_modules: [default, sfAdvancedConstAdmin ] }}} * Clear you cache {{{ symfony cc }}} === Manage constants === * Access the constants management module with the default route: {{{ http://www.example.com/backend.php/sfAdvancedConstAdmin }}} === Use constants in your application === To use constants from sf_setting table in a symfony project: * Put the following line into your main controller symfony file (i.e. index.php, frontend_dev.php, backend.php, etc) include_once (sfConfigCache::getInstance()->checkConfig('config/db_advanced_const.yml')); * You're done.