{"id":36995168,"url":"https://github.com/acid-unit/module-admin","last_synced_at":"2026-01-13T23:47:29.299Z","repository":{"id":272084040,"uuid":"915462767","full_name":"acid-unit/module-admin","owner":"acid-unit","description":"Magento Open Source and Adobe Commerce Acid Unit helper admin extension","archived":false,"fork":false,"pushed_at":"2025-02-12T14:55:50.000Z","size":77,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-11T02:26:48.255Z","etag":null,"topics":["ecommerce","magento","magento-2","magento-2-extension","magento-2-extension-free","magento-2-extensions","magento-2-module","magento-2-modules","magento-extension","magento-module","magento2","magento2-extension","magento2-extension-free","magento2-extensions","magento2-extensions-free","magento2-free-extension","magento2-free-modules","magento2-module","magento2-module-free","magento2-plugin"],"latest_commit_sha":null,"homepage":"https://acid.7prism.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"osl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acid-unit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-11T22:46:15.000Z","updated_at":"2025-02-26T12:14:54.000Z","dependencies_parsed_at":"2025-01-30T23:18:20.890Z","dependency_job_id":"e1867fad-ae92-4c3c-85ee-22d72ea08e4a","html_url":"https://github.com/acid-unit/module-admin","commit_stats":null,"previous_names":["acid-unit/admin","acid-unit/module-admin"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/acid-unit/module-admin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acid-unit%2Fmodule-admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acid-unit%2Fmodule-admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acid-unit%2Fmodule-admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acid-unit%2Fmodule-admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acid-unit","download_url":"https://codeload.github.com/acid-unit/module-admin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acid-unit%2Fmodule-admin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["ecommerce","magento","magento-2","magento-2-extension","magento-2-extension-free","magento-2-extensions","magento-2-module","magento-2-modules","magento-extension","magento-module","magento2","magento2-extension","magento2-extension-free","magento2-extensions","magento2-extensions-free","magento2-free-extension","magento2-free-modules","magento2-module","magento2-module-free","magento2-plugin"],"created_at":"2026-01-13T23:47:29.229Z","updated_at":"2026-01-13T23:47:29.284Z","avatar_url":"https://github.com/acid-unit.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\nA **Magento Open Source** extension that enhances the **admin panel experience** \nwith additional tools, tweaks and customization options.\n\nThis module:\u003cbr\u003e\n✅ **Enhances the admin interface** with additional configuration tools.\u003cbr\u003e\n✅ Improves menu management for better navigation within Acid Unit extensions.\u003cbr\u003e\n✅ Acts as a dependency for all Acid Unit extensions, ensuring consistent admin functionality.\n\n## Quick Installation\n\nTo install the module, run:\n```shell\ncomposer require acid-unit/module-admin\n```\n\n## Admin Features Overview\n\n* [Configuration-Based Tweaks](#configuration-based-tweaks)\n    + [WYSIWYG for PageBuilder `HTML Code` Element](#wysiwyg-editor-for-pagebuilder--html-code--element)\n* [Code-Based Tweaks](#code-based-tweaks)\n    + [WYSIWYG for Textarea Fields](#wysiwyg-editor-for-textarea-fields)\n    + [Table Field](#table-field)\n\n## Configuration-Based Tweaks\n\n![Configuration-Based Tweaks Overview](https://github.com/acid-unit/docs/blob/main/admin/overview.png?raw=true)\n\n### WYSIWYG Editor for PageBuilder `HTML Code` Element\n\n#### Description\n\nEnabling this option allows users to edit content **visually** instead of dealing with raw HTML, \nreducing errors and **improving content management efficiency**.\n\nSince the `HTML Code` element is powerful yet complex, this configuration \nlets **admin users toggle the WYSIWYG editor** inside the element for **quicker editing**.\n\n#### Demo\n\n![Pagebuilder Editor Demo](https://github.com/acid-unit/docs/blob/main/admin/wysiwyg-editor/pagebuilder-editor-demo.gif?raw=true)\n\n## Code-Based Tweaks\n\n### WYSIWYG Editor for Textarea Fields\n\n#### Description\n\nProvides **HTML editing** directly within the admin field, \nproviding a **lightweight alternative to PageBuilder** for small-to-medium content sections.\n\nThis feature allows admins to manage structured data efficiently, making it easier \nto configure settings like custom redirects, tracking events, and more.\n\n#### Implementation\n\nThe **toggle button** should be defined as a new `\u003cfield\u003e` element with the following structure:\n\n```xml\n\u003c!-- VendorName/VendorModule/etc/adminhtml/system.xml --\u003e\n\n\u003csection id=\"page\"\u003e\n    \u003cgroup id=\"form\"\u003e\n        \u003cfield id=\"editable_field\" type=\"textarea\" sortOrder=\"10\"\u003e...\u003c/field\u003e\n        \n        \u003cfield id=\"editable_field_toggle_editor\" sortOrder=\"15\"\u003e\n            \u003cattribute type=\"target_field\"\u003epage_form_editable_field\u003c/attribute\u003e\n            \u003cfrontend_model\u003eAcidUnit\\Admin\\Block\\Adminhtml\\System\\Config\\Form\\Field\\ToggleEditorButton\u003c/frontend_model\u003e\n        \u003c/field\u003e\n    \u003c/group\u003e\n\u003c/section\u003e\n```\n\n📌 Ensure the `sortOrder` value for the toggle button is higher than the target field\nso that it appears **directly beneath it**.\n\n#### Demo\n\n![Admin Field Editor Demo](https://github.com/acid-unit/docs/blob/main/admin/wysiwyg-editor/admin-field-editor-demo.gif?raw=true)\n\n### Table Field\n\n#### Description\n\nThe Table Field is useful for storing structured data in the admin panel, like custom redirects,\nevent tracking mappings, or configurable lists.\n\nBelow is how to define it in `system.xml`.\n\n#### Implementation\n\nTo render a **table field**, define the `\u003cfrontend_model\u003e` and `\u003cbackend_model\u003e` \nclasses in your `\u003cfield\u003e` element:\n\n```xml\n\u003c!-- VendorName/VendorModule/etc/adminhtml/system.xml --\u003e\n\n\u003csection id=\"...\"\u003e\n    \u003cgroup id=\"...\"\u003e\n        \u003cfield id=\"...\"\u003e\n            \u003clabel\u003e...\u003c/label\u003e\n            \u003cfrontend_model\u003eVendorName\\VendorModule\\Block\\Adminhtml\\Form\\Field\\YourCustomTableField\u003c/frontend_model\u003e\n            \u003cbackend_model\u003eVendorName\\VendorModule\\Model\\System\\Config\\Backend\\YourCustomTableField\u003c/backend_model\u003e\n        \u003c/field\u003e\n    \u003c/group\u003e\n\u003c/section\u003e\n```\n\n**Backend \u0026 Frontend Virtual Models**\n\nDefine virtual classes for **backend**, **frontend**, and **helper models**:\n\n```xml\n\u003c!-- VendorName/VendorModule/etc/adminhtml/di.xml --\u003e\n\n\u003c!-- Backend Model Helper --\u003e\n\u003cvirtualType name=\"VendorName\\VendorModule\\Helper\\YourCustomTableField\"\n             type=\"AcidUnit\\Admin\\Helper\\AdminTableField\"\u003e\n    \u003carguments\u003e\n        \u003cargument name=\"tableFields\" xsi:type=\"array\"\u003e\n\n            \u003c!-- items for 'tableFields' argument represent column IDs of your table --\u003e\n            \u003citem name=\"enabled\" xsi:type=\"string\"\u003eenabled\u003c/item\u003e\n            \u003citem name=\"url\" xsi:type=\"string\"\u003eurl\u003c/item\u003e\n            \u003citem name=\"event\" xsi:type=\"string\"\u003eevent\u003c/item\u003e\n        \u003c/argument\u003e\n    \u003c/arguments\u003e\n\u003c/virtualType\u003e\n\n\u003c!-- Backend Model defined in system.xml --\u003e\n\u003cvirtualType name=\"VendorName\\VendorModule\\Model\\System\\Config\\Backend\\YourCustomTableField\"\n             type=\"AcidUnit\\Admin\\Model\\System\\Config\\Backend\\AdminTableField\"\u003e\n    \u003carguments\u003e\n\n        \u003c!-- backend model helper virtual class \n             should be passed as an argument with 'helper' name --\u003e\n        \u003cargument name=\"helper\" xsi:type=\"object\"\u003eVendorName\\VendorModule\\Helper\\YourCustomTableField\u003c/argument\u003e\n    \u003c/arguments\u003e\n\u003c/virtualType\u003e\n\n\u003c!-- Frontend Model defined in system.xml --\u003e\n\u003cvirtualType name=\"VendorName\\VendorModule\\Block\\Adminhtml\\Form\\Field\\YourCustomTableField\"\n             type=\"AcidUnit\\Admin\\Block\\Adminhtml\\Form\\Field\\AdminTableField\"\u003e\n    \u003carguments\u003e\n        \u003cargument name=\"tableFields\" xsi:type=\"array\"\u003e\n\n            \u003c!-- items for 'tableFields' argument here \n                 represents columns of your table --\u003e\n            \u003c!-- for item names use id's defined in backend model helper --\u003e\n            \u003citem name=\"enabled\" xsi:type=\"array\"\u003e\n\n                \u003c!-- 'label' item should have the column label --\u003e\n                \u003citem name=\"label\" xsi:type=\"string\"\u003eEnabled\u003c/item\u003e\n\n                \u003c!-- for the dropdown field you should define 'renderer' item \n                     and pass dropdown renderer class which will be implemented below --\u003e\n                \u003citem name=\"renderer\" xsi:type=\"object\"\u003eVendorName\\VendorModule\\Block\\Adminhtml\\Form\\Field\\Yesno\u003c/item\u003e\n            \u003c/item\u003e\n            \u003citem name=\"url\" xsi:type=\"array\"\u003e\n                \u003citem name=\"label\" xsi:type=\"string\"\u003ePage URL\u003c/item\u003e\n\n                \u003c!-- for the text input field you should define 'class' \n                     item with HTML class list --\u003e\n                \u003c!-- 'admin__control-text' is a required class; \n                     use 'required-entry' class if the field should be required --\u003e\n                \u003citem name=\"class\" xsi:type=\"string\"\u003eadmin__control-text required-entry\u003c/item\u003e\n            \u003c/item\u003e\n            \u003citem name=\"event\" xsi:type=\"array\"\u003e\n                \u003citem name=\"label\" xsi:type=\"string\"\u003eEvent Name\u003c/item\u003e\n                \u003citem name=\"class\" xsi:type=\"string\"\u003eadmin__control-text required-entry\u003c/item\u003e\n            \u003c/item\u003e\n        \u003c/argument\u003e\n\n        \u003c!-- 'buttonLabel' argument is used to set a text \n             for the button to create a new row --\u003e\n        \u003cargument name=\"buttonLabel\" xsi:type=\"string\"\u003eAdd Custom Page\u003c/argument\u003e\n    \u003c/arguments\u003e\n\u003c/virtualType\u003e\n```\n\n📌 Note: Ensure all virtual classes are compiled before deployment.\n\n**Dropdown Renderer for Table Fields**\n\n```php\n\u003c?php\n/** VendorName\\VendorModule\\Block\\Adminhtml\\Form\\Field\\Yesno.php */\n\nnamespace VendorName\\VendorModule\\Block\\Adminhtml\\Form\\Field;\n\nuse Magento\\Framework\\View\\Element\\Html\\Select;\n\nclass Yesno extends Select\n{\n    /**\n     * @param string $value\n     * @return mixed\n     */\n    public function setInputName(string $value): mixed\n    {\n        return $this-\u003esetName($value);\n    }\n\n    /**\n     * Dropdown options are set in this method\n     * First addOption() parameter is an option value, second parameter is an option label\n     * @return string\n     */\n    public function _toHtml(): string\n    {\n        if (!$this-\u003egetOptions()) {\n            $this-\u003eaddOption('1', __('Yes'));\n            $this-\u003eaddOption('0', __('No'));\n        }\n\n        return parent::_toHtml();\n    }\n}\n```\n\n📌 Compile \u0026 Deploy:\n\n```shell\nbin/magento setup:di:compile\nbin/magento setup:static-content:deploy -f\nbin/magento cache:flush\n```\n\n#### Demo\n\n![Pagebuilder Editor Demo](https://github.com/acid-unit/docs/blob/main/admin/table-field/demo.gif?raw=true)\n\n\n#### Additional Notes\n\nThe **Table Field value** is stored as a **stringified object** and can be handled like any regular admin text field.\n\n- On the frontend, use `JSON.parse`.\n- On the backend, use `\\Magento\\Framework\\Serialize\\Serializer\\Json::serialize`.\n\nto parse and manipulate the data.\n\n# Installation\n\nIf you're using another Acid Unit extension, this module is installed automatically as a dependency.  \nHowever, if you want to use these Admin Features separately, install the module manually.\n\n```shell\ncomposer require acid-unit/module-admin\n```\n\nAfter installation, enable the module and run `setup:upgrade`:\n\n```shell\nbin/magento module:enable AcidUnit_Admin\nbin/magento setup:upgrade\n```\n\n# Requirements\n\n✅ **Compatible with**: Magento Open Source \u0026 Adobe Commerce `\u003e=2.4.4`  \n✅ Requires `PHP 8.1+`\n\n\u003csmall\u003e🛠 **Tested on** Magento Open Source `2.4.7-p3` with `PHP 8.3`\u003c/small\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facid-unit%2Fmodule-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facid-unit%2Fmodule-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facid-unit%2Fmodule-admin/lists"}