Sweden Democrats' Meeting Tool
 All Classes Files Functions Variables Pages
Public Member Functions | Public Attributes | Private Member Functions | List of all members
SD_Meeting_Tool_Printing_Template Class Reference

Printing template, containing blocks in which to print a participant. More...

Public Member Functions

 __construct ()
 blocks ()
 fields ()
 add_block ($SD_Meeting_Tool_Printing_Template_Block)
 remove_block ($id)
 update_block ($SD_Meeting_Tool_Printing_Template_Block)
 add_field ($SD_Meeting_Tool_Printing_Template_Block_Field)
 remove_field ($id)
 update_field ($SD_Meeting_Tool_Printing_Template_Block_Field)

Public Attributes

 $id
 $data

Private Member Functions

 add ($thing, &$where)
 find ($id, $where)
 remove ($thing, &$where)
 update ($thing, &$where)

Detailed Description

Printing template, containing blocks in which to print a participant.

See Also
SD_Meeting_Tool_Printing
Author
Edward Plainview edwar.nosp@m.d.pl.nosp@m.ainvi.nosp@m.ew@s.nosp@m.verig.nosp@m.edem.nosp@m.okrat.nosp@m.erna.nosp@m..se

Constructor & Destructor Documentation

SD_Meeting_Tool_Printing_Template::__construct ( )

Member Function Documentation

SD_Meeting_Tool_Printing_Template::add (   $thing,
$where 
)
private

Adds a new thing to somewhere (an array).

Parameters
$thingObject to add.
$whereAn array in which to place the new thing.
Returns
The thing with the new id set.
SD_Meeting_Tool_Printing_Template::add_block (   $SD_Meeting_Tool_Printing_Template_Block)

Adds a new block to our array of blocks.

Assigns an ID and adds it to the array.

Parameters
$SD_Meeting_Tool_Printing_Template_BlockBlock to add.
Returns
A SD_Meeting_Tool_Printing_Template_Block with the new ID set.
SD_Meeting_Tool_Printing_Template::add_field (   $SD_Meeting_Tool_Printing_Template_Block_Field)

Adds a new field to our array of fields.

Assigns an ID and adds it to the array.

Parameters
$SD_Meeting_Tool_Printing_Template_Block_FieldField to add.
Returns
A SD_Meeting_Tool_Printing_Template_Block_Field with the new ID set.
SD_Meeting_Tool_Printing_Template::blocks ( )
Returns
The blocks we have.
SD_Meeting_Tool_Printing_Template::fields ( )
Returns
The fields we have.
SD_Meeting_Tool_Printing_Template::find (   $id,
  $where 
)
private

Looks for a $thing with a specific ID in a $where.

Parameters
$idID to look for.
$whereArray to look in.
Returns
The found thing, else false.
SD_Meeting_Tool_Printing_Template::remove (   $thing,
$where 
)
private

Removes a thing from somewhere (an array).

Parameters
$thingObject to remove.
$whereThe array from whence to remove the thing.
SD_Meeting_Tool_Printing_Template::remove_block (   $id)

Removes a block.

Parameters
$idID of block to remove.
SD_Meeting_Tool_Printing_Template::remove_field (   $id)

Removes a field.

Parameters
$idID of field to remove.
SD_Meeting_Tool_Printing_Template::update (   $thing,
$where 
)
private

Updates a $thing in the array $where.

Uses the thing's ID to find and replace.

Parameters
$thingNew thing.
$whereArray of things.
SD_Meeting_Tool_Printing_Template::update_block (   $SD_Meeting_Tool_Printing_Template_Block)

Updates a block.

Parameters
$SD_Meeting_Tool_Printing_Template_BlockBlock to update.
SD_Meeting_Tool_Printing_Template::update_field (   $SD_Meeting_Tool_Printing_Template_Block_Field)

Updates a field.

Parameters
$SD_Meeting_Tool_Printing_Template_Block_FieldField to update.

Member Data Documentation

SD_Meeting_Tool_Printing_Template::$data

Serialized data. Contains:

  • blocks An array of {SD_Meeting_Tool_Printing_Template_Block}s.
  • size Paper size. A4 is default.
  • orientation Paper orientation. P is default.
  • name Name of the template.
  • pdf PDF attachment (post attachment id) to use as template.
  • print_all_pages If a template is used: automatically insert the rest of the template's pages after each participant.
  • print_even_pages Print an even amount of pages (insert an empty page at the end of odd-numbered templates).
  • fields An array of {SD_Meeting_Tool_Printing_Template_Field}s to be printing in each block.

Note that this is the container class for the fields, since each block has exactly the same fields.

SD_Meeting_Tool_Printing_Template::$id

ID of the template.


The documentation for this class was generated from the following file: