Overview

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • auth
        • ldap
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
      • exchange
        • rates
          • currency
            • layer
          • fixer
          • open
            • exchange
              • rates
          • x
            • rates
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • perforated
            • invoice
          • quickbooks
            • invoice
          • templates
            • default
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • reports
        • aging
          • invoices
        • client
          • data
            • portability
        • custom
          • report
        • invoice
          • creation
        • package
          • revenue
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • core
      • Automation
        • Tasks
          • Common
          • Task
        • Type
          • Common
          • Cron
      • Pricing
        • ItemComparator
        • MetaItem
        • Modifier
          • Type
            • Description
              • Type
                • Discount
                • Option
                • Service
                • Tax
            • Discount
            • Price
            • Proration
        • Presenter
          • Build
            • Invoice
            • InvoiceData
            • Options
            • Service
            • ServiceChange
            • ServiceData
          • Collection
          • Format
            • Fields
            • Type
              • Discount
              • Item
              • Option
              • Options
              • Package
              • Pricing
              • Service
              • Tax
          • Items
            • Invoice
            • Service
          • Type
      • ServiceProviders
      • Util
        • Captcha
          • Captchas
          • Common
        • Common
          • Traits
        • Events
          • Common
          • Handlers
          • Observers
        • Filters
          • Common
        • GeoIp
        • Input
          • Fields
            • Common
        • Tax
        • Widgets
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • helpers
      • color
      • data
        • structure
  • None
  • PHP

Classes

  • InvoiceTemplate
  • InvoiceTemplates
  • TcpdfWrapper
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class InvoiceTemplate

Abstract class that all Invoice Templates must extend

Direct known subclasses

DefaultInvoice, PerforatedInvoice, QuickbooksInvoice
Abstract
Package: blesta\components\invoice\templates
Copyright: Copyright (c) 2010, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at components/invoice_templates/invoice_template.php
Methods summary
abstract public
# setMeta( array $meta )

Sets the meta data to use for this invoice. This method is invoked after __construct() but before makeDocument()

Sets the meta data to use for this invoice. This method is invoked after __construct() but before makeDocument()

Parameters

$meta

An array of meta data including:

  • background The absolute path to the background graphic
  • logo The absolute path to the logo graphic
  • company_name The name of the company
  • company_address The address of the company
  • terms The terms to display on this invoice
  • paper_size The size of paper to use (e.g. "A4" or "Letter")
  • tax An array of tax info including:
    • tax_id The Tax ID/VATIN of this company
    • cascade_tax Whether or not taxes are cascading
abstract public
# setCurrency( CurrencyFormat $currency_format )

Sets the CurrencyFormat object for parsing currency values

Sets the CurrencyFormat object for parsing currency values

Parameters

$currency_format
The CurrencyFormat object
public
# setDate( Date $date )

Sets the Date object for parsing date values

Sets the Date object for parsing date values

Parameters

$date
The Date object
abstract public
# setMimeType( string $mime_type )

Sets the MIME type to be used when fetching and streaming this invoice. Called after __construct()

Sets the MIME type to be used when fetching and streaming this invoice. Called after __construct()

Parameters

$mime_type
The mime_type to render ("application/pdf", "text/html", etc.)
abstract public
# supportedMimeTypes( )

Returns the MIME types that this template supports for output

Returns the MIME types that this template supports for output

abstract public string
# getFileExtension( string $mime_type )

Returns the file extension for the given (supported) mime type

Returns the file extension for the given (supported) mime type

Parameters

$mime_type
The mime_type to fetch the extension of

Returns

string
The extension to use for the given mime type
abstract public
# getName( )

Returns the name of this invoice PDF template

Returns the name of this invoice PDF template

abstract public string
# getVersion( )

Returns the version of this invoice PDF template

Returns the version of this invoice PDF template

Returns

string
The current version of this invoice PDF template
abstract public array
# getAuthors( )

Returns the name and URL for the authors of this invoice PDF template

Returns the name and URL for the authors of this invoice PDF template

Returns

array
The name and URL of the authors of this invoice PDF template
abstract public
# makeDocument( array $invoice_data )

Generates one or more invoices for a single document

Generates one or more invoices for a single document

Parameters

$invoice_data
An numerically indexed array of stdClass objects each representing an invoice

See

Invoices::get()
abstract public
# includeAddress( boolean $include_address = true )

Sets whether or not to include the To address information in the invoice document

Sets whether or not to include the To address information in the invoice document

Parameters

$include_address

True to include the to address information, false to leave the information off of the document

abstract public string
# fetch( )

Returns the invoice document in the desired format

Returns the invoice document in the desired format

Returns

string
The document in binary format
abstract public
# stream( string $name = null )

Outputs the Invoice document to stdout, sending the apporpriate headers to render the document inline

Outputs the Invoice document to stdout, sending the apporpriate headers to render the document inline

Parameters

$name
The name of the document minus the extension (optional).
abstract public
# download( string $name = null )

Outputs the Invoice document to stdout, sending the appropriate headers to force a download of the document

Outputs the Invoice document to stdout, sending the appropriate headers to force a download of the document

Parameters

$name
The name of the document minus the extension (optional).
Blesta API documentation generated by ApiGen