This is the code documentation for the SproutCMS project
Search documentation |
class Category
Functions
public categoryListunknown Category::categoryList ( string $table , int $record_id ); Return an array of IDs of categories a record is in. If there are no categories, returns an empty array. public columnMain2joinerstring Category::columnMain2joiner ( string $table ); Converts a main table name into a joiner column name. Assumes standard naming conventions. public containsunknown Category::contains ( string $table , int $record_id , int $category_id ); Does a given category contatin a given record? Returns true if found, false otherwise public createunknown Category::create ( string $table , string $name ); Creates a category. Returns the id or NULL on failure. public insertIntobool Category::insertInto ( string $table , int $record_id , int $category_id ); Inserts a record into a category. public lookupunknown Category::lookup ( string $table , string $name [, bool $case_sensitive ] ); Looks up a category. Returns the id, or NULL if not found. public lookupOrCreateunknown Category::lookupOrCreate ( string $table , string $name [, bool $case_sensitive ] ); Looks up a category. If not found, creates the category. Returns the id or NULL on failure. public nameunknown Category::name ( string $table , string $id ); Get the name of a category based on the category id Returns the name, or NULL if not found. public recordListunknown Category::recordList ( string $table , int $category_id ); Return an array of IDs of records in a given category. If there are no records, returns an empty array. public removefromunknown Category::removefrom ( string $table , int $record_id , int $category_id ); Removes a record from a category. Returns true on success and false on failure public tableCat2mainstring Category::tableCat2main ( string $table ); Converts a category table (e.g. 'articles_cat_list') into a main table (e.g. 'articles') Assumes standard naming conventions. public tableMain2catstring Category::tableMain2cat ( string $table ); Converts a main table name into a category table name. Assumes standard naming conventions. public tableMain2joinerstring Category::tableMain2joiner ( string $table ); Converts a main table name into a joiner table name. Assumes standard naming conventions. |
Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Monday, 3rd April, 2023 at 02:59 pm |