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/application/classes/Model/Country.php

32 lines
712 B
PHP
Raw Normal View History

2013-10-10 02:44:53 +00:00
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* OSB Country Model
*
* @package OSB
* @category Models
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Model_Country extends ORM {
2013-05-10 10:48:10 +00:00
protected $_has_one = array(
'currency'=>array('far_key'=>'id'),
);
2013-12-05 05:22:23 +00:00
protected $_has_many = array(
'tax'=>array('far_key'=>'id'),
);
protected $_sorting = array(
'name'=>'ASC',
);
protected $_form = array('id'=>'id','value'=>'name');
2013-05-10 10:48:10 +00:00
public static function icon() {
return HTML::image(sprintf('media/img/country/%s.png',strtolower($this->two_code)),array('alt'=>$this->currency->symbol));
2013-10-10 02:44:53 +00:00
}
}
?>