ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions
category_controller_1_0_0 Class Reference

## Public Member Functions
| update_category_title ($Options)
| category_list ($Options)
| on_before_delete_category ($Parameters)
| controller ($Options)

## Detailed Description

Component's controller.

Author
  Dodonov A.A.

Definition at line 26 of file category_controller.php.

## Member Function Documentation

category_list | ( |  | $Options | ) |

Processing categories list.

Parameters

  $Options | - Settings.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 80 of file category_controller.php.

{
try
{
$Link = get_package( 'link' , 'last' , __FILE__ );
$MasterId = $Options->get_setting( 'master_id' );
$MasterType = $Options->get_setting( 'master_type' );
$Link->delete_link( $MasterId , false , $MasterType , 'category' );
$SecurityUtilities = get_package( 'security::security_utilities' , 'last' , __FILE__ );
$Ids = $SesurityUtilities->get_global( '_id_' , 'integer' , CHECKBOX_IDS );
$Link->create_link( $MasterId , $Ids , $MasterType , 'category' , true );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

controller | ( |  | $Options | ) |

Component's controller.

Parameters

  $Options | - Settings.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 155 of file category_controller.php.

{
try
{
$ContextSet = get_package( 'gui::context_set' , 'last' , __FILE__ );
$ContextSet->add_context( dirname( __FILE__ ).'/conf/cfcx_update_category_title' );
$ContextSet->add_context( dirname( __FILE__ ).'/conf/cfcx_category_list' );
$ContextSet->execute( $Options , $this , __FILE__ );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

on_before_delete_category | ( |  | $Parameters | ) |

Category deletion event handler.

Parameters

  $Parameters | - Event parameters.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 118 of file category_controller.php.

{
try
{
/* allways called for the single category */
$cid = get_field( $Parameters , 'id' );
$CategoryAccess = get_package( 'category::category_access' , 'last' , __FILE__ );
$Categories = $CategoryAccess->select_list( $cid );
$CategoryAccess->move_up_children_categories( $cid , get_field( $Categories[ 0 ] , 'root_id' ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

update_category_title | ( |  | $Options | ) |

Updating record.

Parameters

  $Options | - Settings.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 46 of file category_controller.php.

{
try
{
$Security = get_package( 'security' , 'last' , __FILE__ );
$CategoryAlgorithms = get_package( 'category::category_algorithms' , 'last' , __FILE__ );
$CategoryAlgorithms->update_category_title(
$Security->get_p( 'category_id' , 'integer' , 0 ) , $Security->get_p( 'title' , 'string' , '' )
);
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

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

- packages/category/packages/category_controller/category_controller.php