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/Auth/RoleDefault.php

28 lines
705 B
PHP
Raw Normal View History

2010-11-29 22:41:08 +00:00
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
2013-03-19 22:35:19 +00:00
*
* @package OSB
2010-11-29 22:41:08 +00:00
* @category Models
* @author Deon George
2013-03-19 22:35:19 +00:00
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
2010-11-29 22:41:08 +00:00
*/
class Model_Auth_RoleDefault extends Model_Auth_Role {
2013-05-29 11:43:59 +00:00
/**
* Show a bootstrap label button for a field with a boolean value
*/
public function label_bool($column,$render=FALSE) {
if (! isset($this->_table_columns[$column]))
return NULL;
if (! $render)
return $this->display($column);
return View::factory(Config::theme().'/label/bool')
->set('label',$this->$column ? 'label-success' : '')
->set('column',$this->display($column));
}
2010-11-29 22:41:08 +00:00
}
?>