| BethicoLeague 3.10 | BethicoLeague 5.0 |
|---|---|
IPL_CUR_SEASON_ID | $model['season']→activeSeasonId() |
BETHICO_TEMPLATE_URI | URI::base(true).'/templates/'.Factory::getApplication()→getTemplate(true)→template |
BETHICO_STANDINGS_VIEW | $model['season']→teamLeague() |
$bethicoMainConfig | $model['season']→getMainConfig($seasonId) |
$bethicoConfig | $model['season']→getConfig($seasonId) |
$bethicoTeamLeague | Factory::getApplication()→getParams()→get('team_league') |
$bethicoLeague | Factory::getApplication()→getParams()→get('league_type') |
$bethicoByeTerm | Factory::getApplication()→getParams()→get('bye_term') |
| |
| |
| |
| |
| |
$bethicoTeamLeague | $model['season']→teamLeague()$model['league']→teamLeague() |
db: #__bethico_config->league | options: league_type |
db: #__bethico_config->league_code | options: league_code(db prefix if empty) |
db: #__bethico_config->time_string | options: time_locale |
db: #__bethico_config->start_year | options: start_yearmod_bethico_legal: year |
db: #__bethico_config->frames_term | options: frames_term |
db: #__bethico_config->bye_term | options: bye_term |
options: wiki | options: wikiURL |
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\Event\Event;
class PlgSystemMyPlugin extends CMSPlugin
{
public function onExtensionBeforeSave($context, $table)
{
// 1. Check if we are saving component options (com_config)
if ($context !== 'com_config.component') {
return;
}
// 2. Identify which component's options were saved
$componentName = $table->element; // e.g., 'com_content'
if ($componentName === 'com_mycomponent') {
// 3. React to the save (e.g., clear cache, log activity)
$params = $table->params; // The new parameters
// Your custom logic here
// check whether we can modify $table, or we need to call $table->params->set('start_year', date('Y'));
}
}
}
public function getOtherModelData()
{
// ... some logic ...
// Get an instance of 'MyModel2' from the same component (e.g., 'com_mycomponent')
// Assumes MyModel2 is in the Site directory if the current model is in Site
$otherModel = Factory::getApplication()
->bootComponent('com_mycomponent')
->getMVCFactory()
->createModel('MyModel2', 'Site'); // Replace 'Site' with 'Administrator', 'Cli', or 'Api' if needed
// Now you can call methods on the other model
$items = $otherModel->getItems(); // Example method call
return $items;
}
| Joomla 3.10 | Joomla 5.0 | Joomla 6.0 |
|---|---|---|
Factory::getConfig() | $app→getConfig()Factory::getApplication()→getConfig() | $app→getConfig() |
| My code | Joomla 3.10 | Joomla 5.0 |
|---|---|---|
admin.js: alert | alert(msg); | import('joomla.dialog').then(m ⇒ m.default.alert(Joomla.JText._('COM_BETHICOLEAGUE_JS_CANNOT_SELECT')));import('joomla.dialog').then(m ⇒ m.default.alert(Joomla.JText._('COM_BETHICOLEAGUE_JS_CANNOT_SELECT'), Joomla.Text._('INFO', 'Info'))); |
admin.js: alert | alert(msg); | import('joomla.dialog').then(m ⇒ m.default.alert(Joomla.JText._('COM_BETHICOLEAGUE_JS_CANNOT_SELECT'), Joomla.Text._('WARNING', 'Warning'))); |
admin.js: confirm | import('joomla.dialog').then(m ⇒ m.default.confirm(Joomla.JText._('COM_BETHICOLEAGUE_JS_YES_NO'), Joomla.Text._('WARNING', 'Warning'))).then(confirmed ⇒ {if (confirmed) {}}); |
Joomla 3.10: version 2.3.2 Joomla 5.4: version 5.3.8
| Effect | Bootstrap 2.3.2 | Bootstrap 5.3.8 | BethicoLeague |
|---|---|---|---|
| Column Classes | row-fluidspan7span5 | containerrowcol col-12 col-lg-7col-12 col-lg-5 |
#__bethico_bar renamed to #__bethico_venue and fields starting with b_ renamed to starting with v_league, league_code, time_string, start_year, frames_term, bye_term from #__bethico_config moved to component options#__bethico_olddb_team field b_name renamed to v_name