Skip to content

Repository files navigation

HK2 Core

Version License Magento PHP Downloads

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 ModuleHeader block 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

  1. composer require hk2/core
  2. bin/magento module:enable HK2_Core
  3. bin/magento setup:upgrade
  4. bin/magento setup:di:compile
  5. bin/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::root base 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:

License

This project is licensed under the OSL 3.0 License. See the LICENSE.txt file for details.


About

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.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages