elements
[ class tree: elements ] [ index: elements ] [ all elements ]

Class: CreateTemplate

Source Location: /CreateTemplate.inc

Class Overview


Use DOCX as templates


Author(s):

Version:

  • 2013.01.25

Copyright:

  • Copyright (c) 2009-2013 Narcea Producciones Multimedia S.L. (http://www.2mdc.com)

Variables

Methods



Class Details

[line 15]
Use DOCX as templates



Tags:

version:  2013.01.25
copyright:  Copyright (c) 2009-2013 Narcea Producciones Multimedia S.L. (http://www.2mdc.com)
link:  http://www.phpdocx.com
since:  Class available since Release 1.7
license:  http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php


[ Top ]


Class Variables

static $embedFiles = array()

[line 23]



Tags:

access:  public

Type:   array


[ Top ]

static $path =

[line 29]



Tags:

access:  public

Type:   string


[ Top ]

static $placeholderHeaderImages = array()

[line 41]



Tags:

access:  public

Type:   array


[ Top ]

static $placeholderImages = array()

[line 35]



Tags:

access:  public

Type:   array


[ Top ]

static $ridInitTemplateCharts =

[line 47]



Tags:

access:  public

Type:   int


[ Top ]

static $templateVariables = array()

[line 53]



Tags:

access:  public

Type:   string


[ Top ]

static $totalTemplateCharts =

[line 59]



Tags:

access:  public

Type:   int


[ Top ]



Class Methods


static method addContentTypes [line 390]

static void addContentTypes( string $args[0])

Add content types



Tags:

access:  public


Parameters:

string   $args[0]  

[ Top ]

static method addRelationship [line 422]

static void addRelationship( string $args[0])

Add relationship



Tags:

access:  public


Parameters:

string   $args[0]  

[ Top ]

static method deleteAllBlocks [line 488]

static void deleteAllBlocks( )

clear all the placeholders which start with 'BLOCK_'



Tags:

access:  public


[ Top ]

static method getBlnTemplate [line 213]

static boolean getBlnTemplate( )

Check if DOCX is a template



Tags:

access:  public


[ Top ]

static method getContentTypes [line 378]

static string getContentTypes( )

Return current content types



Tags:

access:  public


[ Top ]

static method getDocument [line 225]

static string getDocument( )

Return current document word



Tags:

access:  public


[ Top ]

static method getFooter [line 237]

static array getFooter( )

Return current document footer



Tags:

access:  public


[ Top ]

static method getHeader [line 249]

static array getHeader( )

Return current document header



Tags:

access:  public


[ Top ]

static method getInstance [line 198]

static CreateTemplate getInstance( )



Tags:

access:  public


[ Top ]

static method getNumbering [line 260]

static string getNumbering( )

Return current document word



Tags:

access:  public


[ Top ]

static method getRelsDocumentXMLRels [line 366]

static string getRelsDocumentXMLRels( )

Return current rels document xml rels



Tags:

access:  public


[ Top ]

static method getStyles [line 271]

static string getStyles( )

Return current document styles



Tags:

access:  public


[ Top ]

static method getTemplateGroupSymbol [line 282]

static string getTemplateGroupSymbol( )

Getter. Return template group symbol



Tags:

access:  public


[ Top ]

static method getTemplateSymbol [line 318]

static string getTemplateSymbol( )

Getter. Return template symbol



Tags:

access:  public


[ Top ]

static method getTemplateVariables [line 342]

static array getTemplateVariables( )

Getter. Return template Variables



Tags:

access:  public


[ Top ]

static method openTemplate [line 663]

static void openTemplate( string $args[0])

Open current template



Tags:

access:  public


Parameters:

string   $args[0]  

[ Top ]

static method replaceChart [line 924]

static void replaceChart( string $args[0])

Replace chart in template



Tags:

access:  public


Parameters:

string   $args[0]  

[ Top ]

static method replaceHeaderImage [line 1030]

static void replaceHeaderImage( string $args[0], string $args[1])

Replace image in headers



Tags:

access:  public


Parameters:

string   $args[0]  
string   $args[1]  

[ Top ]

static method replaceHeaderMediaImages [line 1076]

static void replaceHeaderMediaImages( &$docxTemplate, ZipArchive $docxTemplate)

Replace images in the media folder for header images replacement



Tags:

access:  public


Parameters:

ZipArchive   $docxTemplate  
   &$docxTemplate  

[ Top ]

static method replaceImage [line 1092]

static void replaceImage( string $args[0], string $args[1], string $args[2])

Replace image in template



Tags:

access:  public


Parameters:

string   $args[0]  
string   $args[1]  
string   $args[2]  

[ Top ]

static method replaceImages [line 1199]

static void replaceImages( &$docxTemplate, ZipArchive $docxTemplate)

Replace images in template



Tags:

access:  public


Parameters:

ZipArchive   $docxTemplate  
   &$docxTemplate  

[ Top ]

static method replaceVariableChart [line 1859]

static void replaceVariableChart( $chart, $i, string $args[0])

Replace variable char in template



Tags:

access:  public


Parameters:

string   $args[0]  
   $chart  
   $i  

[ Top ]

static method reset [line 1806]

static void reset( )



Tags:

access:  public


[ Top ]

static method setBlnTemplate [line 294]

static void setBlnTemplate( $enable)

Setter. Change if DOCX is a template



Tags:

access:  public


Parameters:

   $enable  

[ Top ]

static method setTemplateGroupSymbol [line 306]

static void setTemplateGroupSymbol( $templateGroupSymbol, string $templateSymbol)

Setter. Set template group symbol



Tags:

access:  public


Parameters:

string   $templateSymbol  
   $templateGroupSymbol  

[ Top ]

static method setTemplateSymbol [line 330]

static void setTemplateSymbol( string $templateSymbol)

Setter. Set template symbol



Tags:

access:  public


Parameters:

string   $templateSymbol  

[ Top ]

static method setTemplateVariables [line 354]

static void setTemplateVariables( array $templateVariables)

Setter. Set template Variables



Tags:

access:  public


Parameters:

array   $templateVariables  

[ Top ]

constructor __construct [line 178]

CreateTemplate __construct( )

Construct



Tags:

access:  public


[ Top ]

destructor __destruct [line 188]

void __destruct( )

Destruct



Tags:

access:  public


[ Top ]

method checkCheckbox [line 445]

void checkCheckbox( string $var, [int $value = 1])

Checks or unchecks a template checkbox



Tags:

access:  public


Parameters:

string   $var   variable name
int   $value  

[ Top ]

method cleanExplode [line 2217]

array cleanExplode( string $delimiter, string $string)

Returns an array with clean exploded variables



Tags:

access:  public


Parameters:

string   $delimiter  
string   $string  

[ Top ]

method deleteBlock [line 539]

void deleteBlock( string $blockName)

Clear a specific placeholder which starts with 'BLOCK_'



Tags:

access:  public


Parameters:

string   $blockName   Block name

[ Top ]

method modifyInputText [line 602]

void modifyInputText( array $data)

Modify the value of input fields



Tags:

access:  public


Parameters:

array   $data   with the key the anme of the variable and the value the value of the input text

[ Top ]

method parseBlock [line 751]

void parseBlock( string $blockName)

Prepare the placeholder. Clear the wordXML code between the characters of the placeholder.



Tags:

access:  public


Parameters:

string   $blockName   Block name

[ Top ]

method prepareSections [line 767]

void prepareSections( $document)

prepares sections for merging



Tags:

access:  public


Parameters:

   $document  

[ Top ]

method removeParentParagraph [line 825]

void removeParentParagraph( string $variableName)

Removes the paragraph containing a variable and replaces it for a special altChunk tag



Tags:

access:  public


Parameters:

string   $variableName  

[ Top ]

method removeVariable [line 869]

void removeVariable( string $variableName, string $type)

Removes a template variable with its container paragraph



Tags:

access:  public


Parameters:

string   $variableName  
string   $type  

[ Top ]

method replaceCheckbox [line 978]

void replaceCheckbox( string $checkName, string $value)

Replace a placeholder with a checkbox



Tags:

access:  public


Parameters:

string   $value   Value
string   $checkName   checkName Checkbox variable name

[ Top ]

method replaceVariable [line 1222]

void replaceVariable( mixed $args[0]., mixed $args[1], mixed $args[2].)

Replace variables in template.

Allows text strings and array of values as variables.




Tags:

access:  public


Parameters:

mixed   $args[0].   Array or string
mixed   $args[1]  
mixed   $args[2].   Optional. Settings template

[ Top ]

method replaceVariableByHTML [line 1738]

void replaceVariableByHTML( $var $var, $type, $type, $wordHTML $wordHTML)

Replace variables in template by HTML.



Tags:

access:  public


Parameters:

$var   $var   variable to be replaced
$type,   $type   inline or block
$wordHTML   $wordHTML   the world chunck generated out of HTML that we want to insert

[ Top ]

method returnAllVariables [line 1987]

array returnAllVariables( )

Return template variables



Tags:

access:  public


[ Top ]

method returnVariables [line 2043]

array returnVariables( )

Return template variables. Only for legaldocx.



Tags:

access:  public


[ Top ]

method TemplateHTMLRels [line 1830]

void TemplateHTMLRels( array $sFinalDocX, $options, $pathToBaseTemplate)

Takes care of the links and images asociated with an HTML chunck processed by the embedHTML method in the case of a Template



Tags:

access:  public


Parameters:

array   $sFinalDocX   an arry with the required link and image data
   $options  
   $pathToBaseTemplate  

[ Top ]


Documentation generated on Mon, 13 Jan 2014 13:44:21 +0100 by phpDocumentor 1.4.4