Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ComponentTableItem extends JTable
- {
- function __construct(&$db)
- {
- parent::__construct('#__cmp_item', 'id', $db);
- JTableObserverTags::createObserver($this, array('typeAlias' => 'com_component.item'));
- }
- }
- public function delete(&$pks)
- {
- $db = JFactory::getDbo();
- $pks = (array)$pks;
- // Iterate the items to delete each one.
- foreach ($pks as $i => $pk) {
- $item = JTable::getInstance('item', 'ComponentTable');
- $item->load($pk);
- //...do some stuff
- //and finally delete the item
- $item->delete($pk);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement