ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions
gallery_controller_1_0_0 Class Reference

## Public Member Functions
| attach_file ($Options)
| detach_file ($Options)
| controller ($Options)

## Detailed Description

Class of the controller.

Author
  Dodonov A.A.

Definition at line 26 of file gallery_controller.php.

## Member Function Documentation

attach_file | ( |  | $Options | ) |

Function attaches file to the gallery.

Parameters

  $Options | - Settings.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 46 of file gallery_controller.php.

{
try
{
$FileInputController = get_package( 'file_input::file_input_controller' , 'last' , __FILE__ );
if( $FileInputController->UploadedFile )
{
$Security = get_package( 'security' , 'last' , __FILE__ );
$GalleryAlgorithms = get_package( 'gallery::gallery_algorithms' , 'last' , __FILE__ );
$GalleryId = $Security->get_gp( 'gallery_id' , 'integer' );
$FileId = get_field( $FileInputController->UploadedFile , 'id' );
$GalleryAlgorithms->attach_file( $GalleryId , $FileId );
}
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

controller | ( |  | $Options | ) |

Function controls component.

Parameters

  $Options | - Settings.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 123 of file gallery_controller.php.

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

detach_file | ( |  | $Options | ) |

Function detaches file from the gallery.

Parameters

  $Options | - Settings.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 87 of file gallery_controller.php.

{
try
{
$Security = get_package( 'security' , 'last' , __FILE__ );
$GalleryId = $Security->get_gp( 'gallery_id' , 'integer' );
$FileId = $Security->get_gp( 'file_id' , 'integer' );
$GalleryAlgorithms = get_package( 'gallery::gallery_algorithms' , 'last' , __FILE__ );
$GalleryAlgorithms->detach_file( $GalleryId , $FileId );
}
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/gallery/packages/gallery_controller/gallery_controller.php