justbetter / magento2-core
JustBetter Magento 2 modules core
Installs: 235
Dependents: 4
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
Type:magento2-module
pkg:composer/justbetter/magento2-core
Requires
- php: ^8.2
- magento/framework: ^103.0
- magento/module-backend: ^102.0
- magento/module-config: ^101.0
Requires (Dev)
- bitexpert/phpstan-magento: ^0.11.0
- magento/magento-coding-standard: ^33
- phpro/grumphp: ^2.0
- phpstan/phpstan: ^1.10
- squizlabs/php_codesniffer: ^3.0
This package is not auto-updated.
Last update: 2026-01-26 14:10:19 UTC
README
JustBetter - Magento 2 Core
Core module providing base infrastructure and foundation for all JustBetter Magento 2 modules.
Report Bug
ยท
Request Feature
Table of Contents
About The Module
This module by JustBetter provides core infrastructure and shared functionality that other JustBetter Magento 2 modules depend on. It serves as the foundational layer for all JustBetter extensions, providing a unified admin experience and centralized management.
Built With
Contributors
Thanks to all the people who have contributed to this project:
Features
This module provides the following features for JustBetter extensions:
- Unified Admin Menu: A centralized "JustBetter" menu item in the Magento admin panel for quick access to all JustBetter extension configurations
- Configuration Tab: A dedicated "JustBetter Extensions" tab in System Configuration to group all extension settings
- Extensions Overview: An admin panel displaying all installed JustBetter extensions with version information and GitHub links
Getting Started
This module is automatically installed as a dependency when installing any JustBetter module that depends on it.
After installation, enable the module:
bin/magento module:enable JustBetter_Core
bin/magento setup:upgrade && bin/magento cache:flush
Integration Guide
This section describes how other JustBetter extensions can integrate with the Core module to provide a consistent user experience across all JustBetter modules.
Adding as a Dependency
Add the Core module as a dependency in your extension's composer.json:
{
"require": {
"justbetter/magento2-core": "^1.0"
}
}
Define the module sequence in etc/module.xml to ensure proper loading order:
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <module name="JustBetter_YourModule"> <sequence> <module name="JustBetter_Core"/> </sequence> </module> </config>
Automatic Extensions List
All packages with the justbetter/* vendor prefix are automatically detected and displayed in the Extensions overview within the admin panel. No additional configuration is required for your extension to appear in this list.
The extensions list displays:
- Package name with link to GitHub repository
- Installed version (from
composer.lock)
Adding Menu Items
To add your extension to the centralized JustBetter admin menu, create etc/adminhtml/menu.xml. The menu uses a section header with submenu items structure:
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd"> <menu> <add id="JustBetter_YourModule::section" title="Your Module" module="JustBetter_YourModule" translate="title" sortOrder="40" parent="JustBetter_Core::menu" resource="JustBetter_YourModule::menu"/> <add id="JustBetter_YourModule::config" title="Configuration" module="JustBetter_YourModule" translate="title" sortOrder="10" action="adminhtml/system_config/edit/section/yourmodule_settings" parent="JustBetter_YourModule::section" resource="JustBetter_YourModule::config"/> </menu> </config>
Using the Configuration Tab
To place your extension's configuration under the "JustBetter Extensions" tab in System Configuration, create etc/adminhtml/system.xml:
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd"> <system> <section id="yourmodule_settings" translate="label" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> <label>Your Module</label> <tab>justbetter</tab> <resource>JustBetter_YourModule::config</resource> <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> <label>General Settings</label> <!-- Add your configuration fields here --> </group> </section> </system> </config>
Contributing
Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.
Development:
# Run quality checks (PHPStan) composer analyse # Run GrumPHP tasks manually composer grumphp
Note: GrumPHP runs automatically on git commit.
For security vulnerabilities, please see our Security Policy.
License
Distributed under the GPL-3.0 License. See LICENSE for more information. Please see License File for more information.