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

Class: Content_GeneratorForm

Source Location: /content_classes/generatorform.class.php

Class Overview




Variables

Methods



Class Details

[line 38]


[ Top ]


Class Variables

static $instance =  null

[line 45]

Singleton



Tags:

access:  public

Type:   object


[ Top ]

$base =  null

[line 52]

Reference to base class



Tags:

access:  public

Type:   object


[ Top ]



Class Methods


constructor __construct [line 59]

Content_GeneratorForm __construct( )

Start instance of base class, load configuration and establish database connection. Please don't call the constructor direcly, use the singleton pattern instead.



Tags:

access:  public


[ Top ]

method addGeneratorForm [line 87]

int addGeneratorForm( int $id, array $sqlData)

Adds generator form to the generator form table. Takes the page id as first argument, a field=>value array with generator form data as second argument. Returns insert id.



Tags:

return:  Generator form id
throws:  Content_GeneratorFormException
access:  public


Parameters:

int   $id   Page id
array   $sqlData   Row data

[ Top ]

method deleteGeneratorForm [line 168]

int deleteGeneratorForm( int $id)

Removes generator form from the generator forms table. Takes the generator form id as first argument. Returns amount of affected rows.



Tags:

return:  Amount of affected rows
throws:  Content_GeneratorFormException
access:  public


Parameters:

int   $id   Generator form id

[ Top ]

method generatorFormBelongsToCurrentProject [line 467]

int generatorFormBelongsToCurrentProject( int $generator_form)

Tests whether given generator form belongs to current project. Takes the generator form id as first argument. Returns bool.



Tags:

return:  bool
throws:  Content_GeneratorFormException
access:  public


Parameters:

int   $generator_form   Generator form id

[ Top ]

method generatorFormBelongsToCurrentUser [line 517]

bool generatorFormBelongsToCurrentUser( int $generator_form)

Test whether generator form belongs to current user or not. Takes the generator form id as first argument. Returns bool.



Tags:

throws:  Content_GeneratorFormException
access:  public


Parameters:

int   $generator_form   Generator form id

[ Top ]

method selectGeneratorForm [line 205]

array selectGeneratorForm( int $id)

Selects one generator form. Takes the generator form id as first argument. Returns array with generator form information.



Tags:

throws:  Content_GeneratorFormException
access:  public


Parameters:

int   $id   Generator form id

[ Top ]

method selectGeneratorForms [line 321]

array selectGeneratorForms( [array $params = array()])

Method to select one or more generator forms. Takes key=>value array with select params as first argument. Returns array.

List of supported params:

  • user, int, optional: User/author id
  • form, int, optional: Form id
  • start, int, optional: row offset
  • limit, int, optional: amount of rows to return
  • order_marco, string, otpional: How to sort the result set. Supported macros:
    • FORM: sorty by form id
    • DATE_MODIFIED: sorty by date modified
    • DATE_ADDED: sort by date added




Tags:

throws:  Content_GeneratorFormException
access:  public


Parameters:

array   $params   Select params

[ Top ]

method updateGeneratorForm [line 126]

int updateGeneratorForm( int $id, array $sqlData)

Updates generator form. Takes the generator form id as first argument, a field=>value array with the new generator form data as second argument.

Returns amount of affected rows.




Tags:

return:  Affected rows
throws:  Content_GeneratorFormException
access:  public


Parameters:

int   $id   Generator form id
array   $sqlData   Row data

[ Top ]


Documentation generated on Sun, 08 Jan 2012 17:51:49 +0100 by phpDocumentor 1.4.3