array('foreign_key'=>'id','far_key'=>'domain_tld_id'), 'host_server'=>array('far_key'=>'host_server_id','foreign_key'=>'id'), ); protected $_belongs_to = array( 'service'=>array(), ); protected $_display_filters = array( 'domain_name'=>array( array('strtoupper',array(':value')), ), 'host_expire'=>array( array('Config::date',array(':value')), ), ); // Required abstract functions public function service_view() { return View::factory('service/user/plugin/host/view') ->set('so',$this); } public function name() { return sprintf('%s.%s',$this->display('domain_name'),$this->domain_tld->display('name')); } protected function _admin_update() { } /** * This provides us with a manage button to jump to the hosting server * to manage the domain. */ public function manage_button() { return ($this->host_username AND $this->host_password) ? $this->host_server->manage_button($this->host_username,$this->host_password,$this->name()) : ''; } } ?>