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

Class: Content_PageType

Source Location: /content_classes/pagetype.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_PageType __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 addPageType [line 85]

int addPageType( array $sqlData)

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



Tags:

return:  PageType id
throws:  Content_PageTypeException
access:  public


Parameters:

array   $sqlData   Row data

[ Top ]

method deletePageType [line 163]

int deletePageType( int $id)

Removes page type from the page type table. Takes the page type id as first argument. Returns amount of affected rows



Tags:

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


Parameters:

int   $id   Page type id

[ Top ]

method pageTypeBelongsToCurrentProject [line 455]

int pageTypeBelongsToCurrentProject( int $page_type)

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



Tags:

return:  bool
throws:  Content_PageTypeException
access:  public


Parameters:

int   $page_type   Page type id

[ Top ]

method pageTypeBelongsToCurrentUser [line 501]

bool pageTypeBelongsToCurrentUser( int $page_type)

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



Tags:

throws:  Content_PageTypeException
access:  public


Parameters:

int   $page_type   Page type id

[ Top ]

method selectPageType [line 201]

array selectPageType( int $id)

Selects one page type. Takes the page type id as first argument.

Returns array with page type information.




Tags:

throws:  Content_PageTypeException
access:  public


Parameters:

int   $id   Page type id

[ Top ]

method selectPageTypes [line 260]

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

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

List of supported params:

  • start, int, optional: row offset
  • limit, int, optional: amount of rows to return




Tags:

throws:  Content_PageTypeException
access:  public


Parameters:

array   $params   Select params

[ Top ]

method testForUniqueInternalName [line 397]

bool testForUniqueInternalName( string $name, [int $id = null])

Tests given internal page type name for uniqueness. Takes the

internal page type name as first argument and an optional page type id as second argument. If the page type id is given, this page type won't be considered when checking for uniqueness (useful for updates). Returns boolean true if the internal page type name is unique.




Tags:

throws:  Content_PageTypeException
access:  public


Parameters:

string   $name   Internal page type name
int   $id   Page type id

[ Top ]

method testForUniqueName [line 334]

bool testForUniqueName( string $name, [int $id = null])

Tests given page type name for uniqueness. Takes the page type name as first argument and an optional page type id as second argument. If the page type id is given, this page type won't be considered when checking for uniqueness (useful for updates).

Returns boolean true if page type name is unique.




Tags:

throws:  Content_PageTypeException
access:  public


Parameters:

string   $name   Page type name
int   $id   Page type id

[ Top ]

method updatePageType [line 121]

int updatePageType( int $id, array $sqlData)

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

Returns amount of affected rows.




Tags:

return:  Affected rows
throws:  Content_PageTypeException
access:  public


Parameters:

int   $id   Page type id
array   $sqlData   Row data

[ Top ]


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