This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/modules/export/classes/Model/Export/DataMap.php

40 lines
989 B
PHP
Raw Permalink Normal View History

<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class supports OSB exporting.
*
* @package Export
2013-05-28 11:35:54 +00:00
* @category Models
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Model_Export_DataMap extends ORM {
// Relationships
protected $_belongs_to = array(
'export_module' => array(),
'module' => array(),
);
2014-08-25 04:41:07 +00:00
protected $_compress_column = array(
'map_data',
);
public function list_itemsnoexport(Model $o,$emoid,$desc='name(Site::language())') {
$result = array();
$o->select(array($this->table_name().'.id','edm'))
->join($this->table_name(),'LEFT OUTER')
->on($this->table_name().'.item_id','=',$o->table_name().'.id')
->on('export_module_id','=',$emoid)
->where($o->table_name().'.status','=',TRUE)
->having('edm','=',NULL);
foreach ($o->find_all() as $object)
$result[$object->id] = $object->resolve($desc);
return $result;
}
}
?>