hk2 / core
HK2 Core module - The foundational base module for all Magento 2 HK2 extensions.
Package info
github.com/basantmandal/magento2-hk2-core-module
Language:Shell
Type:magento2-module
pkg:composer/hk2/core
Requires
- php: ^8.1 || ^8.2 || ^8.3 || ^8.4
- magento/framework: ^103.0.0
README
Overview
The HK2 Core module is the foundational base module for all Magento 2 HK2 extensions. It establishes standard administrative configurations, reusable backend blocks, and standardized headers for module configuration screens.
๐ฏ Use Cases
- Module Base: Required by all other HK2 extensions (AddBootstrap5, CSP, ScrollTop, etc.) to function correctly.
- Admin Consolidation: Consolidates HK2 module configurations into a single, organized tab in the Magento Admin Panel.
๐ Features
- โ๏ธ Registers a centralized "HK2 Extensions" configuration tab.
- ๐ Sets up a main admin menu item under System for HK2.
- ๐ Implements a root ACL resource for all HK2 modules.
- ๐จ Provides a reusable
ModuleHeaderblock for consistent branding.
๐ Architecture
- Core Module Components: Base adminhtml system configurations.
- Design Patterns: Standard Magento UI configuration implementations.
๐งฉ Magento Components
Blocks
HK2\Core\Block\Adminhtml\System\Config\ModuleHeader
Layout XML
HK2_Core::system/config/module_header.phtml
๐ฆ Requirements
- Magento version: 2.4.4 - 2.4.9
- PHP requirements: 8.1 || 8.2 || 8.3 || 8.4
- Composer requirements:
magento/framework: ^103.0.0
โ๏ธ Installation
composer require hk2/corebin/magento module:enable HK2_Corebin/magento setup:upgradebin/magento setup:di:compilebin/magento cache:flush
๐ง Configuration
This module primarily provides configuration tabs for other modules. No specific configuration is required for the Core module itself.
Usage
This module works silently in the background. Once installed, navigating to Stores > Configuration will display a new "HK2" tab where dependent modules will render their settings.
๐ Database Changes
Not Applicable
๐ Module Structure
Block/
โโโ Adminhtml/
โ โโโ System/
โ โโโ Config/
โ โโโ ModuleHeader.php
etc/
โโโ adminhtml/
โ โโโ menu.xml
โ โโโ system.xml
โโโ acl.xml
โโโ module.xml
view/
โโโ adminhtml/
โโโ templates/
โโโ system/
โโโ config/
โโโ module_header.phtml
๐งช Testing
Not Applicable
๐ Performance Considerations
Not Applicable
๐ Security Considerations
- ACL usage: Defines
HK2_Core::rootbase ACL for administrative access to HK2 configurations.
Compatibility
Reference: docs/compatibility.md
| Platform | Supported Versions |
|---|---|
| Magento | 2.4.4 - 2.4.9 |
| PHP | 8.1, 8.2, 8.3, 8.4 |
๐ Upgrade Notes
Not Applicable
๐ Troubleshooting
If HK2 tabs do not appear in the admin panel, ensure that the cache has been flushed and HK2_Core is enabled using bin/magento module:status.
๐ค Contributing
Contributions are welcome! If you'd like to improve the installer:
- โญ Star this repository (Helps others find it!)
- ๐ด Fork the project
- ๐ Report bugs
- ๐ก Suggest new features
- ๐ค Contribute improvements
Every โญ helps increase the visibility of the project and motivates further development.
โ๏ธ Disclaimer
The author provides this installation script "as is" without any warranties. Users are responsible for ensuring that running this script complies with their internal security and software requirements.
๐ค Support
For bug reports, feature requests, and general support:
- Author: Basant Mandal
- Email: support@basantmandal.in
- Website: https://www.basantmandal.in
License
This project is licensed under the OSL 3.0 License. See the LICENSE.txt file for details.