Class client_groups

client_entity
  |
  +--client_groups

public class client_groups
extends client_entity

Client part support for Article System.
Functions to handle groups on the client side.


Constructor Summary
client_groups(var $art, var $gro, var $ima)
           
 
Method Summary
 unknown get_all(var $how)
          Return list of exported article groups.
 unknown get_articles(var $id, var $what)
          Returns basic data of articles of given group.
 unknown get_by(var $col, var $val)
          Return group data of group specified by given column name and it's value.
 unknown get_children(var $id, var $order)
          Alias for get_groups.
 unknown get_groups(var $id, var $order)
          Returns data of groups with parent group of given id.
 unknown get_root()
          Return data of top level (root) group.
 unknown get(var $id)
          Return data of group specified by id.
 
Methods inherited from class client_entity
get_by, get_image_assignment, get_image_link, get_image_tag, get_image, select_box
 

Constructor Detail

client_groups

public client_groups(var $art,
                     var $gro,
                     var $ima)
Parameters:
$art - is passed by reference
$gro - is passed by reference
$ima - is passed by reference
Method Detail

get_all

public unknown get_all(var $how)
Return list of exported article groups. For each of them returns $this->columns data set.
Default ordering by 'menu_text' ascending.
Parameters:
$how - Optional WHERE/ORDER clause that overrides the default ordering.
$how - Default Value: "WHERE exported='1' ORDER BY menu_text ASC"
Returns:
array of asoc.arrays

get_by

public unknown get_by(var $col,
                      var $val)
Return group data of group specified by given column name and it's value. Returned data is specified in $this->columns.
Parameters:
$col - Name of the column which $val is data from.
$val - Value to specify the wanted group.
Returns:
asoc.array

get

public unknown get(var $id)
Return data of group specified by id. Returned data is specified in $this->columns.
Parameters:
$id - Id of a group.
Returns:
asoc.array

get_root

public unknown get_root()
Return data of top level (root) group. The data contains 'id, name, menu_text, description'.
Returns:
asoc.array

get_articles

public unknown get_articles(var $id,
                            var $what)
Returns basic data of articles of given group. Namely 'A.id, A.title, A.menu_title, A.issue, U.name, A.preview', as this is the default for get_group. The list is ordered by A.issue ascending.
Parameters:
$id - Id of an issue
$what - List of columns to get from Articles.
$what - Default Value: "A.id
Returns:
array of associative arrays

get_groups

public unknown get_groups(var $id,
                          var $order)
Returns data of groups with parent group of given id. Namely $this->columns. The list is ordered by Agroups.gorder value.
Parameters:
$id - Id of an issue
$order - Default Value: "ORDER BY gorder"
Returns:
array of associative arrays

get_children

public unknown get_children(var $id,
                            var $order)
Alias for get_groups.
Parameters:
$order - Default Value: "ORDER BY gorder"
See Also:
get_groups