ultimix
category_widgets_1_0_0 Class Reference

Public Member Functions

 __construct ()
 compile_category_tree (&$BlockSettings)
 compile_categories_list_type_list (&$Categories)
 compile_categories_list_type_active_list (&$AllCategories, &$Categories, $MasterId, $MasterType)
 get_select_category_from_tree_data (&$BlockSettings)
 compile_select_category_from_tree (&$BlockSettings)

Data Fields

 $BlockSettings = false
 $CachedMultyFS = false
 $CategoryAccess = false
 $CategoryAlgorithms = false
 $CategoryView = false
 $String = false

Detailed Description

Processing macroes.

Author
Dodonov A.A.

Definition at line 26 of file category_widgets.php.

Constructor & Destructor Documentation

__construct ( )

Constructor.

Author
Dodonov A.A.

Definition at line 55 of file category_widgets.php.

{
try
{
$this->BlockSettings = get_package_object( 'settings::settings' , 'last' , __FILE__ );
$this->CachedMultyFS = get_package( 'cached_multy_fs' , 'last' , __FILE__ );
$this->CategoryAccess = get_package( 'category::category_access' , 'last' , __FILE__ );
$this->CategoryAlgorithms = get_package( 'category::category_algorithms' , 'last' , __FILE__ );
$this->CategoryView = get_package( 'category::category_view' , 'last' , __FILE__ );
$this->String = get_package( 'string' , 'last' , __FILE__ );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

Member Function Documentation

compile_categories_list_type_active_list ( $AllCategories,
$Categories,
  $MasterId,
  $MasterType 
)

Function draws list of categories.

Parameters
$AllCategories- All possible categories.
$Categories- Object's categories.
$MasterId- Master-object's id.
$MasterType- Master-object's type.
Returns
HTML code of the component.
Exceptions
ExceptionAn exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 234 of file category_widgets.php.

{
try
{
$Code = $this->compile_active_list_code( $AllCategories , $Categories );
$ActiveListTemplate = $this->CachedMultyFS->get_template( __FILE__ , 'active_list.tpl' );
$PlaceHolders = array( '{code}' , '{master_id}' , '{master_type}' );
return( str_replace( $PlaceHolders , array( $Code , $MasterId , $MasterType ) , $ActiveListTemplate ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
compile_categories_list_type_list ( $Categories)

Function draws list of categories.

Parameters
$Categories- Object's categories.
Returns
HTML code of the component.
Exceptions
ExceptionAn exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 130 of file category_widgets.php.

{
try
{
$Titles = get_field_ex( $Categories , 'title' );
$Template = $this->CachedMultyFS->get_template( __FILE__ , 'categories_list_type_list.tpl' );
$TitleTemplate = $this->CachedMultyFS->get_template( __FILE__ , 'title_item.tpl' );
return( str_replace( '{titles}' , implode( $TitleTemplate , $Titles ) , $Template ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
compile_category_tree ( $BlockSettings)

Function processes macro 'category_tree'.

Parameters
$BlockSettings- Options of drawing.
Returns
HTML code of the list.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 94 of file category_widgets.php.

{
try
{
$this->CategoryView->draw_categories_tree( $BlockSettings );
return( $this->CategoryVie->Output );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
compile_select_category_from_tree ( $BlockSettings)

Function processes macro 'select_category_from_tree'.

Parameters
$BlockSettings- Options of drawing.
Returns
HTML code of the list.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 518 of file category_widgets.php.

{
try
{
$Code = $this->CachedMultyFS->get_template( __FILE__ , 'select_category_from_tree.tpl' );
$Code = $this->String->print_record( $Code , $Data );
return( $Code );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
get_select_category_from_tree_data ( $BlockSettings)

Function returns macro parameters.

Parameters
$BlockSettings- Macro parameters.
Returns
Macro parameters.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 472 of file category_widgets.php.

{
try
{
$CategoryName = $BlockSettings->get_setting( 'category_name' );
$Name = $BlockSettings->get_setting( 'name' , 'category' );
$Title = $BlockSettings->get_setting( 'title' , 'category_selection' );
$Class = $BlockSettings->get_setting( 'class' , 'width_160 flat' );
list( $id , $Value , $VisibleValue ) = $this->get_dialog_parameters( $BlockSettings , $CategoryName );
return(
array(
'category_name' => $CategoryName , 'name' => $Name , 'title' => $Title ,
'class' => $Class , 'value' => $Value , 'visible_value' => $VisibleValue , 'id' => $id
)
);
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

Field Documentation

$BlockSettings = false

Cached objects.

Author
Dodonov A.A.

Definition at line 38 of file category_widgets.php.

$CachedMultyFS = false

Definition at line 39 of file category_widgets.php.

$CategoryAccess = false

Definition at line 40 of file category_widgets.php.

$CategoryAlgorithms = false

Definition at line 41 of file category_widgets.php.

$CategoryView = false

Definition at line 42 of file category_widgets.php.

$String = false

Definition at line 43 of file category_widgets.php.


The documentation for this class was generated from the following file: