ultimix
page_manager_1_0_0 Class Reference

Public Member Functions

 __construct ()
 update_packages ($Options)
 update_permitions ($Options)
 controller ($Options)
 update_permitions_form ($Options)
 view ($Options)

Data Fields

 $Output
 $CachedMultyFS = false
 $Security = false
 $String = false

Detailed Description

This manager helps to create pages.

Author
Dodonov A.A.

Definition at line 26 of file page_manager.php.

Constructor & Destructor Documentation

__construct ( )

Constructor.

Author
Dodonov A.A.

Definition at line 64 of file page_manager.php.

{
try
{
$this->CachedMultyFS = get_package( 'cached_multy_fs' , 'last' , __FILE__ );
$this->Security = get_package( 'security' , '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

controller (   $Options)

Function controls component.

Parameters
$Options- Settings.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 165 of file page_manager.php.

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

Function updates record.

Parameters
$Options- Settings.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 96 of file page_manager.php.

{
try
{
$Security = get_package( 'security' , 'last' , __FILE__ );
$PageName = $Security->get_p( 'page_record_id' , 'command' );
$PageAccess = get_package( 'page::page_access' , 'last' , __FILE__ );
$PageAccess->set_package_appliance( $PageName , $Security->get_p( 'page_packages' , 'unsafe_string' ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
update_permitions (   $Options)

Function updates record.

Parameters
$Options- Settings.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 130 of file page_manager.php.

{
try
{
$Security = get_package( 'security' , 'last' , __FILE__ );
$PageName = $Security->get_p( 'page_record_id' , 'command' );
$PermitAccess = get_package( 'permit::permit_access' , 'last' , __FILE__ );
$Permitions = $Security->get_p( 'page_permitions' , 'unsafe_string' );
$PermitAccess->set_permits_for_page( $PageName , $Permitions );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
update_permitions_form (   $Options)

Function draws page's permitions updating form.

Parameters
$Options- Settings.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 201 of file page_manager.php.

{
try
{
$this->Output = $this->CachedMultyFS->get_template( __FILE__ , 'permitions_form.tpl' );
$PermitAccess = get_package( 'permit::permit_access' , 'last' , __FILE__ );
$PageAlias = $this->Security->get_p( 'page_record_id' , 'command' );
$Permitions = $PermitAccess->get_permits_for_page( $PageAlias );
$Permitions = implode( ',' , $Permitions );
$this->Output = str_replace( '{prefix}' , 'page' , $this->Output );
$this->Output = str_replace( '{page_permitions}' , $Permitions , $this->Output );
$this->Output = str_replace( '{page_alias}' , $PageAlias , $this->Output );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
view (   $Options)

Function draws component.

Parameters
$Options- Settings.
Returns
HTML code of the компонента.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 244 of file page_manager.php.

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

Field Documentation

$CachedMultyFS = false

Cached objects.

Author
Dodonov A.A.

Definition at line 50 of file page_manager.php.

$Output

Display function's result.

Author
Dodonov A.A.

Definition at line 38 of file page_manager.php.

$Security = false

Definition at line 51 of file page_manager.php.

$String = false

Definition at line 52 of file page_manager.php.


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