modules/Reports/sugarpdf/sugarpdf.detail_and_total.php

Show: inherited
Table of Contents

\ReportsSugarpdfDetail_and_total

Package:
Parent(s)
\ReportsSugarpdfReports < \Sugarpdf < \TCPDF

Constants

Constant  STRETCH_NONE = 0
inherited

Stretch options constants

Inherited from: \Sugarpdf::STRETCH_NONE\ReportsSugarpdfReports::STRETCH_NONE
Constant  STRETCH_SCALE = 1
Constant  STRETCH_SPACING = 3

Properties

Propertypublic  $aclAction= 'PDF_ACL_ACCESS'
inherited

Use for the ACL access.

Inherited from: \Sugarpdf::$$aclAction\ReportsSugarpdfReports::$$aclAction
Default valuePDF_ACL_ACCESSDetails
Type
n/a
Inherited_from
\Sugarpdf::$$aclAction  
Inherited_from
\ReportsSugarpdfReports::$$aclAction  
Propertypublic  $action= ''''
inherited

The name of the current action.

Inherited from: \Sugarpdf::$$action\ReportsSugarpdfReports::$$action
Default value''Details
Type
n/a
Inherited_from
\Sugarpdf::$$action  
Inherited_from
\ReportsSugarpdfReports::$$action  
Propertypublic  $bean= 'null'
Default valuenullDetails
Type
n/a
Inherited_from
\Sugarpdf::$$bean  
Inherited_from
\ReportsSugarpdfReports::$$bean  
Propertypublic  $errors= 'array()'
inherited

Any errors that occured this can either be set by the view or the controller or the model

Inherited from: \Sugarpdf::$$errors\ReportsSugarpdfReports::$$errors
Default valuearray()Details
Type
n/a
Inherited_from
\Sugarpdf::$$errors  
Inherited_from
\ReportsSugarpdfReports::$$errors  
Propertypublic  $fileName= 'PDF_FILENAME'
inherited

Use to set the filename of the output pdf file.

Inherited from: \Sugarpdf::$$fileName\ReportsSugarpdfReports::$$fileName
Default valuePDF_FILENAMEDetails
Type
n/a
Inherited_from
\Sugarpdf::$$fileName  
Inherited_from
\ReportsSugarpdfReports::$$fileName  
Propertypublic  $module= ''''
inherited

The name of the current module.

Inherited from: \Sugarpdf::$$module\ReportsSugarpdfReports::$$module
Default value''Details
Type
n/a
Inherited_from
\Sugarpdf::$$module  
Inherited_from
\ReportsSugarpdfReports::$$module  
PropertyprotectedArray  $options= 'array( "evencolor"=>"#DCDCDC", "header"=>array("fill"=>"#4B4B4B", "fontStyle"=>"B", "textColor"=>"#FFFFFF"), )'
inherited

Options array for the writeCellTable method of reports.

Inherited from: \ReportsSugarpdfReports::$$options
Default valuearray( "evencolor"=>"#DCDCDC", "header"=>array("fill"=>"#4B4B4B", "fontStyle"=>"B", "textColor"=>"#FFFFFF"), )Details
Type
Array
Inherited_from
\ReportsSugarpdfReports::$$options  
Propertypublic  $sugarpdf_object_map= 'array()'
inherited

This array is meant to hold an objects/data that we would like to pass between the controller and the view. The bean will automatically be set for us, but this is meant to hold anything else.

Inherited from: \Sugarpdf::$$sugarpdf_object_map\ReportsSugarpdfReports::$$sugarpdf_object_map
Default valuearray()Details
Type
n/a
Inherited_from
\Sugarpdf::$$sugarpdf_object_map  
Inherited_from
\ReportsSugarpdfReports::$$sugarpdf_object_map  

Methods

methodpublicCell(  $w,  $h = 0,  $txt = '',  $border = 0,  $ln = 0,  $align = '',  $fill = 0,  $link = '',  $stretch = 0 ) : void
inherited

[OVERRIDE] Cell method in tcpdf library.

Inherited from: \Sugarpdf::Cell()\ReportsSugarpdfReports::Cell()

Handle charset conversion and HTML entity decode. This method override the regular Cell() method to apply the prepare_string() function to the string to print in the PDF. The cell method is used by all the methods which print text (Write, MultiCell).

Parameters
Name Type Description
$w
$h
$txt
$border
$ln
$align
$fill
$link
$stretch
Details
See
\include/tcpdf/TCPDF#Cell()  
methodpublicHeader( ) : void
inherited

[OVERRIDE] This method override the regular Header() method to enable the custom image directory in addition to the OOB image directory.

Inherited from: \Sugarpdf::Header()\ReportsSugarpdfReports::Header()

This method is used to render the page header. It is automatically called by AddPage().

Details
Access
public  
See
\include/tcpdf/TCPDF#Header()  
methodpublicInfo( ) : void
methodpublicLn1( ) : void
inherited

This Ln1() method will always print a line break of one line height.

Inherited from: \Sugarpdf::Ln1()\ReportsSugarpdfReports::Ln1()

The regular Ln() method print a line break which has the height of the last printed cell.

methodpublicOutput(  $name = 'doc.pdf',  $dest = 'I' ) : void
inherited

Disable zlib output compression if we are downloading the PDF.

Inherited from: \Sugarpdf::Output()\ReportsSugarpdfReports::Output()
Parameters
Name Type Description
$name
$dest
Details
See
\TCPDF::Output()  
methodpublicSetFont( string $family, string $style = '', float $size = 0, string $fontfile = '' ) : void
inherited

[OVERRIDE] SetFont method in TCPDF Library This method override the regular SetFont() method to enable the custom font directory in addition to the OOB font directory.

Inherited from: \Sugarpdf::SetFont()\ReportsSugarpdfReports::SetFont()
Parameters
Name Type Description
$family string

Family font. It can be either a name defined by AddFont() or one of the standard Type1 families (case insensitive):

  • times (Times-Roman)
  • timesb (Times-Bold)
  • timesi (Times-Italic)
  • timesbi (Times-BoldItalic)
  • helvetica (Helvetica)
  • helveticab (Helvetica-Bold)
  • helveticai (Helvetica-Oblique)
  • helveticabi (Helvetica-BoldOblique)
  • courier (Courier)
  • courierb (Courier-Bold)
  • courieri (Courier-Oblique)
  • courierbi (Courier-BoldOblique)
  • symbol (Symbol)
  • zapfdingbats (ZapfDingbats)

It is also possible to pass an empty string. In that case, the current family is retained.

$style string

Font style. Possible values are (case insensitive):

  • empty string: regular
  • B: bold
  • I: italic
  • U: underline
  • D: line trough

or any combination. The default value is regular. Bold and italic styles do not apply to Symbol and ZapfDingbats basic fonts or other fonts when not defined.

$size float

Font size in points. The default value is the current size. If no size has been specified since the beginning of the document, the value taken is 12

$fontfile string

The font definition file. By default, the name is built from the family and style, in lower case with no spaces.

Details
Access
public  
See
\include/tcpdf/TCPDF#SetFont()  
methodpublic__construct(  $bean = null,  $sugarpdf_object_map = array(),  $orientation = PDF_PAGE_ORIENTATION,  $unit = PDF_UNIT,  $format = PDF_PAGE_FORMAT,  $unicode = true,  $encoding = 'UTF-8',  $diskcache = false ) : void
inherited

Constructor which will peform the setup.

Inherited from: \Sugarpdf::__construct()\ReportsSugarpdfReports::__construct()
Parameters
Name Type Description
$bean
$sugarpdf_object_map
$orientation
$unit
$format
$unicode
$encoding
$diskcache
methodpublicdisplay( ) : void

[OVERRIDE] - This method is meant to overidden in a subclass.

methodpublicdisplayErrors( ) : void
inherited

This method will display the errors on the page.

Inherited from: \Sugarpdf::displayErrors()\ReportsSugarpdfReports::displayErrors()
methodprivategetLineHeightFromArray( \$line $line, \$width $width ) : \The
inherited

Return the heigth of a line depending of the width, the font and the content

Inherited from: \Sugarpdf::getLineHeightFromArray()\ReportsSugarpdfReports::getLineHeightFromArray()
Parameters
Name Type Description
$line \$line

Array containing the data of all the cells of the line

$width \$width

Array containing the width of all the cells of the line

Returns
Type Description
\The heigth of the line
methodpublicgetNumLines( string $txt, float $w = 0 ) : int
inherited

This is method is fix for a better handling of the count. This method now handle the line break between words.

Inherited from: \Sugarpdf::getNumLines()\ReportsSugarpdfReports::getNumLines()

This method returns the estimated number of lines required to print the text.

Parameters
Name Type Description
$txt string

text to print

$w float

width of cell. If 0, they extend up to the right margin of the page.

Returns
Type Description
int Return the estimated number of lines.
Details
Access
public  
OVERRIDE
 
Since
4.5.011  
methodprivateinitOptionsForWriteCellTable( \$options $options, \$item $item ) : \$options
inherited

Private method for writeCellTable which format and initialize the options array.

Inherited from: \Sugarpdf::initOptionsForWriteCellTable()\ReportsSugarpdfReports::initOptionsForWriteCellTable()
Parameters
Name Type Description
$options \$options

array

$item \$item

array

Returns
Type Description
\$options array
methodpublicpreDisplay( ) : void
inherited

[OVERRIDE] - This method is meant to overidden in a subclass. The purpose of this method is to allow a view to do some preprocessing before the display method is called. This becomes useful when you have a view defined at the application level and then within a module have a sub-view that extends from this application level view. The application level view can do the setup in preDisplay() that is common to itself and any subviews and then the subview can just override display(). If it so desires, can also override preDisplay().

Inherited from: \ReportsSugarpdfReports::preDisplay()
methodpublicprocess( ) : void
inherited

This method will be called from the controller and is not meant to be overridden.

Inherited from: \Sugarpdf::process()\ReportsSugarpdfReports::process()
methodprivatewrap(  $tag,  $value,  $options ) : \the
inherited

return the HTML code of the value wrap with the tag $tag. This method handle options (general and specific)

Inherited from: \Sugarpdf::wrap()\ReportsSugarpdfReports::wrap()
Parameters
Name Type Description
$tag
$value
$options
Returns
Type Description
\the HTML wrapped code
methodpublicwriteCellTable( \$item $item, \$options $options = NULL ) : void
inherited

This method allow printing a table using the MultiCell method with a formatted options array in parameter Options : header options override the regular options for the header's cells - $options['header'] cell options override the regular options for the specific cell - Array[line number (0 to x)][cell header]['options']

Inherited from: \Sugarpdf::writeCellTable()\ReportsSugarpdfReports::writeCellTable()
Parameters
Name Type Description
$item \$item

Array[line number (0 to x)][cell header] = Cell content OR Array[line number (0 to x)][cell header]['value'] = Cell content AND Array[line number (0 to x)][cell header]['options'] = Array[cell properties] = values

$options \$options

Array which can contain : width (array 'column name'=>'width value + % OR nothing'), isheader (bool), header (array), fill (string: HTML color), ishtml (bool) default: false, border (0: no border (defaul), 1: frame or all of the following characters: L ,T ,R ,B), align (L: left align, C: center, R: right align, J: justification), stretch (array 'column name'=>stretch type)

Details
See
\MultiCell()  
methodpublicwriteHTMLTable( \$item $item, \$returnHtml $returnHtml = false, \$options $options = NULL ) : \the
inherited

This method allow printing a table using the writeHTML method with a formatted array in parameter This method can also return the table as HTML code

Inherited from: \Sugarpdf::writeHTMLTable()\ReportsSugarpdfReports::writeHTMLTable()
Parameters
Name Type Description
$item \$item

Array[line number (0 to x)][cell header] = Cell content OR Array[line number (0 to x)][cell header]['value'] = Cell content AND Array[line number (0 to x)][cell header]['options'] = Array[cell properties] = values

$returnHtml \$returnHtml

(bool) Return the table as HTML code instead of printing the HTML table

$options \$options

Array which can contain : table (array of "HTML proprty"=>"value"),td (array of "HTML proprty"=>"value"), tr (array of "HTML proprty"=>"value"), isheader(bool), header (array of "HTML proprty"=>"value"), width (array 'column name'=>'width value + unit OR nothing')

Returns
Type Description
\the HTML code if $returnHtml set to true
Documentation was generated by DocBlox 0.18.1.