phproberto / joomla-module
Library to interact and develop Joomla! modules
dev-master
2017-06-22 14:33 UTC
Requires
- php: >=5.4.0
Requires (Dev)
- joomla/registry: ^1.4.5
- phproberto/joomla-common: @dev
- phpunit/phpunit: ^4.8.35
This package is auto-updated.
Last update: 2025-03-10 14:57:24 UTC
README
Base classes to develop Joomla! Modules.
STILL NOT READY FOR PRODUCTION
What?
Have you ever seen something like this?
// Include the latest functions only once JLoader::register('ModArticlesLatestHelper', __DIR__ . '/helper.php'); $list = ModArticlesLatestHelper::getList($params); $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8'); require JModuleHelper::getLayoutPath('mod_articles_latest', $params->get('layout', 'default'));
Wouldn't be better to be able to just use something like this?
JLoader::registerPrefix('ModArticlesLatest', __DIR__); echo ModArticlesLatestModule::getInstance($module->id)->setParams($params)->render();
Modules are the only part where Joomla! doesn't use OOP. Start using these module classes now and take advantage of its benefits.
Requirements
- PHP 5.4+ Due to the use of traits
- Joomla! CMS v3.7+
Benefits
- Modules are only loaded once from database.
- Support for legacy templates system (99% backward compatible) and
JLayoutFile
layouts. - Easily and transparently load & save module parameters.
- Unit tested to ensure that your modules are never broken.
- Built over years of experience dealing with Joomla! modules.
- 100% Opensource.
Documentation
Check docs for detailed documentation.
License
This library is licensed under GNU/GPL 2 license.
Copyright (C) 2017 Roberto Segura López - All rights reserved.