Skip to content

Various use cases for using Joomla models in a flexible way

Notifications You must be signed in to change notification settings

coolbung/joomla-supermodels

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Joomla Supermodels

Various use cases for using Joomla models in a flexible way

These files are part of the presentation at

Using Models in modules or any other place

<?php
JLoader::import('components.com_jticketing.models.events', JPATH_ADMINISTRATOR);
JLoader::import('components.com_jticketing.models.event', JPATH_ADMINISTRATOR);
JLoader::import('components.com_jticketing.tables.event', JPATH_ADMINISTRATOR);

$items_model = JModelLegacy::getInstance('events', 'JTicketingModel');
$item_model = JModelLegacy::getInstance('event', 'JTicketingModel');

$items_model->setState('filter.state', 1);
//$items_model->setState('filter.start_up', '2016-10-24');
$items = $items_model->getItems();

$single_item = $item_model->getItem(4);

print_r($single_item);
print_r($items);

About

Various use cases for using Joomla models in a flexible way

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published