SCHLIX\cmsApplication_ManyToMany

Inherited from cmsApplication_HierarchicalTree_List
Implements interface_cmsApplication_HierarchicalTree_List
Inherits Blog, Users

Protected Attributes

protected $_fieldname_categories_items 
protected $table_categories_items 
protected $field_categories_items_is_primary= NULL
protected $url_mode= CMS_APPLICATION_MANY_TO_MANY_URL_SINGLE

Protected Methods

protected getNonAmbiguousFieldNames($tablename)

Public Methods

public __construct(string $app_description, string $table_items, string $table_categories, string $table_categories_items, string $field_categories_items_is_primary='is_primary')
Constructor
public boolcategoriesToitemJointColumnExists(string $fieldname)
Returns true if categories_items table contains fieldname
public stringpreventDuplicateValueInItemTableUnderCategory(string $fieldname, string $possible_duplicate, int $id, int $category_id)
Returns a new name if there's an item with the same name in the specified $fieldname $SystemDB
public getTotalItemCountByCategoryID($category_id, $criteria='', $cache=false)
public arraygetItemsToCategoryFieldNames()
Returns the item-category field names
public getItemsToCategoryTable()
Returns the item-category table
public stringgetItemsToCategoryTableName()
Returns the item-category table name
public boolean|stringgetFullPathByItemID(int $item_id, $force_cid)
CMS_APPLICATION_MANY_TO_MANY_URL_SINGLE, CMS_APPLICATION_MANY_TO_MANY_URL_WITH_CATEGORY $SystemDB
public getItemsByCategoryID($id, $fields=' *', $extra_criteria='', $start, $end, $sortby='', $sortdirection='ASC', $from_cache=false)
public booleanverifyAllCategoriesExist(array $category_array)
Returns true if all category IDs in $category_array are valid categories $SystemDB
public booleansetItemCategories(int $id, array $cid_array)
Set the item to the specified category if the state is true, otherwise the item will be removed from the category. The content of cid_array must be an array of a positive number greater than 1 $SystemDB $SystemLog
public booleansetItemCategory(int $id, int $cid, bool $state)
Set the item to the specified category if the state is true, otherwise the item will be removed from the category $SystemDB
public getItemCategoryIDsByItemID($id, $sortby='', $sortdirection='ASC', $from_cache=false)
public getItemPrimaryCategory($id)
public boolsetItemPrimaryCategory(int $id, int $primary_cid)
Set the primary category of an item $SystemDB
public typeisItemInCategoryID(int $id, int $cid)
Returns true if item is in this this category SCHLIX $SystemDB
public arraygetAllChildItemsInMultipleCategories(string $multiple_category_ids)
Given a comma-separated $multiple_category_ids, returns all item IDs of items with that category I $SystemDB
public arraygetItemCategoriesByItemID(int $id, string $sortby='', string $sortdirection='ASC', type $from_cache=false)
Returns item categoryies by item ID $SystemDB
public arraygetItemsByVirtualFilename(string $input_filename, int $category_id=-1)
Returns one or more item with the same virtual filename. Used in later classes. There's a parameter $category_id that's not supposed to be in this class but it's there for compatibility with inherited classes $SystemDB
public stringcreateFriendlyURL(string $str)
create SEO friendly URL. Format is action={...}¶m1={....}¶m2={...}
public getAllCategoriesWithAssociationToItem($id)