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

Class: Content_Navigation

Source Location: /content_classes/navigation.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_Navigation __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 addNavigation [line 85]

int addNavigation( array $sqlData)

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



Tags:

return:  Navigation id
throws:  Content_NavigationException
access:  public


Parameters:

array   $sqlData   Row data

[ Top ]

method deleteNavigation [line 166]

int deleteNavigation( int $id)

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



Tags:

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


Parameters:

int   $id   Navigation id

[ Top ]

method navigationBelongsToCurrentProject [line 391]

int navigationBelongsToCurrentProject( int $navigation)

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



Tags:

return:  bool
throws:  Content_NavigationException
access:  public


Parameters:

int   $navigation   Navigation id

[ Top ]

method navigationBelongsToCurrentUser [line 437]

bool navigationBelongsToCurrentUser( int $navigation)

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



Tags:

throws:  Content_NavigationException
access:  public


Parameters:

int   $navigation   navigation id

[ Top ]

method selectNavigation [line 204]

array selectNavigation( int $id)

Selects one navigation. Takes the navigation id as first argument.

Returns array with navigation information.




Tags:

throws:  Content_NavigationException
access:  public


Parameters:

int   $id   Navigation id

[ Top ]

method selectNavigations [line 261]

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

Method to select one or more navigations. 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_NavigationException
access:  public


Parameters:

array   $params   Select params

[ Top ]

method testForUniqueName [line 333]

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

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

Returns boolean true if navigation name is unique.




Tags:

throws:  Content_NavigationException
access:  public


Parameters:

string   $name   Navigation name
int   $id   Navigation id

[ Top ]

method updateNavigation [line 124]

int updateNavigation( int $id, array $sqlData)

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

Returns amount of affected rows.




Tags:

return:  Affected rows
throws:  Content_NavigationException
access:  public


Parameters:

int   $id   Navigation id
array   $sqlData   Row data

[ Top ]


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