Revamping invoice PDF rendering and standardisation work
This commit is contained in:
@@ -17,22 +17,26 @@ abstract class Model_Service_Plugin extends ORM_OSB {
|
||||
'service'=>array(),
|
||||
);
|
||||
|
||||
/** REQUIRED ABSTRACT METHODS **/
|
||||
|
||||
/**
|
||||
* Service attributes
|
||||
*/
|
||||
abstract public function attributes($variable=NULL);
|
||||
|
||||
/**
|
||||
* When does our service expire
|
||||
*/
|
||||
abstract public function expire();
|
||||
|
||||
/**
|
||||
* Our service name as defined in the DB
|
||||
*/
|
||||
abstract public function name();
|
||||
|
||||
/**
|
||||
* The table attributes that provide username/password values
|
||||
*/
|
||||
abstract public function password();
|
||||
abstract public function username();
|
||||
|
||||
/** LOCAL METHODS **/
|
||||
|
||||
/**
|
||||
* Provide the button that launches the management of this service, generally from a 3rd party
|
||||
*/
|
||||
@@ -93,30 +97,5 @@ $(document).ready(function() {
|
||||
return View::factory(sprintf('service/user/plugin/%s/view',$this->plugin()))
|
||||
->set('o',$this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show our service name as defined in the DB with product suffix.
|
||||
*/
|
||||
public function service_name() {
|
||||
return sprintf('%s - %s',$this->service->product->title(),$this->name());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get specific service details for use in other modules
|
||||
* For Example: Invoice
|
||||
*
|
||||
* @todo Make the rendered items configurable
|
||||
* @todo Change this method name, now that it is public
|
||||
*/
|
||||
public function _details($type) {
|
||||
switch ($type) {
|
||||
// Nothing to add for invoices
|
||||
case 'invoice_detail_items':
|
||||
return array();
|
||||
|
||||
default:
|
||||
throw new Kohana_Exception('Unkown detail request :type',array(':type'=>$type));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user