{"id":20601218,"url":"https://github.com/cleverage/ezplatformsettingsbundle","last_synced_at":"2026-03-19T16:39:04.084Z","repository":{"id":45590214,"uuid":"251359163","full_name":"cleverage/EzplatformSettingsBundle","owner":"cleverage","description":null,"archived":false,"fork":false,"pushed_at":"2021-12-06T22:39:22.000Z","size":3561,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-06T16:18:53.169Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"SCSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cleverage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-30T16:11:49.000Z","updated_at":"2021-12-06T22:36:57.000Z","dependencies_parsed_at":"2022-09-11T16:21:48.224Z","dependency_job_id":null,"html_url":"https://github.com/cleverage/EzplatformSettingsBundle","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/cleverage/EzplatformSettingsBundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleverage%2FEzplatformSettingsBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleverage%2FEzplatformSettingsBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleverage%2FEzplatformSettingsBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleverage%2FEzplatformSettingsBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cleverage","download_url":"https://codeload.github.com/cleverage/EzplatformSettingsBundle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cleverage%2FEzplatformSettingsBundle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30329698,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T09:09:03.102Z","updated_at":"2026-03-10T10:04:57.026Z","avatar_url":"https://github.com/cleverage.png","language":"SCSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"CleverEzSettingsBundle\n===================\n\nCleverEzSettingsBundle is a modification of the MasevSettingsBundle for ezPlatform 2.x\nLink to MasevSettings : https://github.com/masev/MasevSettingsBundle/blob/master/README.md\n\nCleverEzSettingsBundle introduce a settings system into eZ Platform 3.x\nAll settings are injected in Symfony container as a parameter.\nThere are compatible with the eZ Publish Config Resolver allowing you the define settings per siteaccess.\n\n![Screenshot of the UI](https://github.com/cleverage/CleverEZSettingsBundle/blob/master/ui.png?raw=true)\n\n## Install\n\n### Step 1: Download CleverEzSettingsBundle using composer\n\nAdd CleverEzSettingsBundle in your composer.json with the repository:\n\n```js\n{\n    \"require\": {\n        \"clever/settings-bundle\": \"dev-master\"\n    },\n    \"repositories\": [\n      {\n        \"type\": \"vcs\",\n        \"url\": \"https://github.com/cleverage/CleverEZSettingsBundle\"\n      }\n    ]    \n}\n```\n\nChange dev-master with the release you want.\n\nNow tell composer to download the bundle by running the command:\n\n``` bash\n$ php composer.phar update clever/settings-bundle\n```\n\nComposer will install the bundle to your project's `vendor/clever/settings-bundle` directory.\n\n### Step 2: Enable the bundle\n\nEnable the bundle in the kernel:\n\n``` php\n\u003c?php\n// config/bundles.php\n\nreturn [\n    // ...\n    Masev\\SettingsBundle\\MasevSettingsBundle::class =\u003e ['all' =\u003e true],\n];\n\n```\n\nAdd the routes in your routing base configuration by creating a masev_settings.yml file :\n\n```yaml\n# config/routes/masev_settings.yml\n\npiles_settings:\n    resource: \"@MasevSettingsBundle/Resources/config/routing.yml\"\n    prefix:   /\n```    \n\n### Step 3: Configuration\n\nCreate a config file in config/packages/\n\nMysql example :\n```yaml\n# config/packages/masev_settings.yml\nmasev_settings:\n    mysql:\n        url: '%env(resolve:DATABASE_URL)%'\n    http_cache_purge:\n        enabled: true (to enable varnish purge)\n```\n\n For Mysql Storage you need to initialize the setting table with the following query :\n\n```sql\nCREATE TABLE `masev_settings` (\n  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,\n  `identifier` varchar(255) NOT NULL DEFAULT '',\n  `value` TEXT NOT NULL,\n  `updatedAt` DATETIME NOT NULL,    \n  `updatedBy` TEXT NOT NULL,\n  `scope` varchar(255) NOT NULL DEFAULT 'default',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `identifier_scope` (`identifier`,`scope`)\n) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;\n```\n\n### Step 4: Declaring configurable settings\n\nCreate a file named settings.xml in the global config folder config/masev_settings.xml\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" ?\u003e\n\u003csettings xmlns=\"http://william-pottier.fr/schema/settings\"\n          xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n          xsi:schemaLocation=\"http://william-pottier.fr/schema/settings https://raw.github.com/wpottier/WizadSettingsBundle/master/Resources/schema/settings-1.0.xsd\"\u003e\n\n    \u003cparameter key=\"category.sub_category.sender_name\"\u003e\n        \u003cname\u003eEmail sender name\u003c/name\u003e\n        \u003cdefault\u003eMe\u003c/default\u003e\n    \u003c/parameter\u003e\n\n    \u003cparameter key=\"category.sub_category.sender_email\"\u003e\n        \u003cname\u003eEmail sender address\u003c/name\u003e\n        \u003cdefault\u003eme@my-site.com\u003c/default\u003e\n    \u003c/parameter\u003e\n    \n    \u003cparameter key=\"category.sub_category.message\"\u003e\n        \u003cname\u003eMessage\u003c/name\u003e\n        \u003cdefault\u003e\u003c/default\u003e\n        \u003cform type=\"textarea\" cols=\"30\" rows=\"10\"\u003e\u003c/form\u003e\n    \u003c/parameter\u003e\n\n\u003c/settings\u003e\n```\nSettings key must have a category and sub_category name to be displayed correctly in the admin UI.\n\nClear the Symfony cache :\n\n```\nphp bin/console cache:clear \u0026\u0026 php bin/console cache:warmup\n```\n\nAt this step you should be able the define settings in the admin UI (configuration tab in the eZ Publish Legacy Administration).\n\n### Step 5 : Query your settings\n\nNow that you have define settings you can query them with the [eZ Publish config resolver](https://doc.ezplatform.com/en/latest/guide/config_dynamic/).\n\n```php\n// Get the 'category.sub_category.sender_name' settings in the current scope (i.e. current siteaccess)\n$this-\u003econfigResolver-\u003egetParameter('category.sub_category.sender_name', 'masev_settings');\n\n// You can force siteaccess\n$this-\u003econfigResolver-\u003egetParameter('category.sub_category.sender_name', 'masev_settings', 'my_site_access');\n```\n\nIn a twig template you can use the getMasevSettings() Twig function.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleverage%2Fezplatformsettingsbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcleverage%2Fezplatformsettingsbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleverage%2Fezplatformsettingsbundle/lists"}