ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions | Data Fields
group_manager_1_0_0 Class Reference

## Public Member Functions
| __construct ()
| change_permits_controller ($Options)
| change_permits_view ($Options)
| controller ($Options)
| view ($Options)

## Data Fields
| $CachedMultyFS = false
| $GroupAccess = false
| $Link = false
| $PermitAccess = false
| $PermitAlgorithms = false
| $Security = false

## Detailed Description

This class controls component.

Author
  Dodonov A.A.

Definition at line 26 of file group_manager.php.

## Constructor & Destructor Documentation

__construct | ( |  | ) |

Constructor.

Author
  Dodonov A.A.

Definition at line 55 of file group_manager.php.

{
try
{
$this->CachedMultyFS = get_package( 'cached_multy_fs' , 'last' , __FILE__ );
$this->GroupAccess = get_package( 'permit::group_access' , 'last' , __FILE__ );
$this->Link = get_package( 'link' , 'last' , __FILE__ );
$this->PermitAccess = get_package( 'permit::permit_access' , 'last' , __FILE__ );
$this->PermitAlgorithms = get_package( 'permit::permit_algorithms' , 'last' , __FILE__ );
$this->Security = get_package( 'security' , 'last' , __FILE__ );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Member Function Documentation

change_permits_controller | ( |  | $Options | ) |

Function controls component.

Parameters

  $Options | - Settings.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 90 of file group_manager.php.

{
try
{
$Group = $this->GroupAccess->get_group_by_id( $this->Security->get_p( 'record_id' , 'integer' ) );
$Permits = $this->Security->get_p( 'permits' , 'command' , array() );
$HasPermits = $this->PermitAlgorithms->get_permits_for_object( $Group->id , 'group' , false );
foreach( $HasPermits as $p )
{
if( in_array( $p , $Permits ) === false )
{
$p = $this->PermitAccess->get_permit_by_name( $p );
$this->Link->delete_link( $Group->id , $p->id , 'group' , 'permit' );
}
}
foreach( $Permits as $p )
{
$this->PermitAccess->add_permit_for_object( $p , $Group->id , 'group' );
}
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

change_permits_view | ( |  | $Options | ) |

Function draws component.

Parameters

  $Options | - Settings.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 137 of file group_manager.php.

{
try
{
$Group = $this->GroupAccess->get_group_by_id( $this->Security->get_p( 'group_record_id' , 'integer' ) );
$this->Output = $this->CachedMultyFS->get_template( __FILE__ , 'group_permits_view.tpl' );
$this->Output = str_replace( '{path}' , dirname( __FILE__ ) , $this->Output );
$this->Output = str_replace( '{title}' , get_field( $Group , 'title' ) , $this->Output );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

controller | ( |  | $Options | ) |

Function controlls component.

Parameters

  $Options | - Settings.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 172 of file group_manager.php.

{
try
{
$ContextSet = get_package_object( 'gui::context_set' , 'last' , __FILE__ );
$ContextSet->add_context( dirname( __FILE__ ).'/conf/cfcx_change_permits_controller' );
$ContextSet->execute( $Options , $this , __FILE__ );
}
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 209 of file group_manager.php.

{
try
{
$ContextSet = get_package_object( 'gui::context_set' , 'last' , __FILE__ );
$ContextSet->add_context( dirname( __FILE__ ).'/conf/cfcx_change_permits_view' );
$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 38 of file group_manager.php.

$GroupAccess = false

Definition at line 39 of file group_manager.php.

$Link = false

Definition at line 40 of file group_manager.php.

$PermitAccess = false

Definition at line 41 of file group_manager.php.

$PermitAlgorithms = false

Definition at line 42 of file group_manager.php.

$Security = false

Definition at line 43 of file group_manager.php.

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

- packages/permit/packages/group_manager/group_manager.php