Class

CategoriesManager

Package: Content\Category Copyright: © 2005-2019 PHPBoost License: GNU/GPL-3.0 Author: Kevin MASSY reidlos@phpboost.com Version: PHPBoost 5.2 - last update: 2016 10 24 Since: PHPBoost 4.0 - 2013 01 29 Contributor: Julien BRISWALTER j1.seth@phpboost.com Contributor: Arnaud GENET elenwii@phpboost.com Located at: content/category/CategoriesManager.class.php

This class allows you to easily integrate a complete system of categories in its script. It needs to have its first instantiation of a parameter child object CategoriesCache and as the second parameter to have a CategoriesItemsParameters object.

Methods summary
public
# __construct( CategoriesCache $categories_cache, CategoriesItemsParameters $categories_items_parameters )
public
# add( Category $category )
public
# update( Category $category )
public
# move_into_another( Category $category, integer $id_parent, integer $position = 0 )

Moves a category and items into another category. You can specify its future position in its future parent category.

public
# move_items_into_another( Category $category, integer $id_parent )

Moves items into another category.

public
# update_position( Category $category, integer $id_parent, integer $position )

Update category and items position.

public
# delete( integer $id )

Deletes a category and items.

public
# get_children( integer $id_category, SearchCategoryChildrensOptions $search_category_children_options, $add_this = false )

Category[string] the children Categories map (id => category) for category id

public
# get_parents( integer $id_category, boolean $add_this = false )

Category[string] the parents Categories map (id => category) for category id

public mixed[]
# get_heritated_authorizations( integer $id_category, integer $bit, integer $mode )

Computes the global authorization level of the whole parent categories. The result corresponds to all the category's parents merged.

public
# get_select_categories_form_field( $id, $label, $value, SearchCategoryChildrensOptions $search_category_children_options, array $field_options = array() )
public FeedsCategoriesModule
public
public CategoriesCache
public string
# get_module_id( )
public CategoriesItemsParameters
Constants summary
string STANDARD_CATEGORY_CLASS
# 'Category'
string RICH_CATEGORY_CLASS
# 'RichCategory'
Annonces