ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions | Data Fields
group_controller_1_0_0 Class Reference

## Public Member Functions
| __construct ()
| set_group ($Options)
| delete_group ($Options)
| toggle_group ($Options)
| on_set_single_group_for_object ($Parameters)
| controller ($Options)

## Data Fields
| $PermitAccess = false
| $PermitAlgorithms = false
| $Security = false

## Detailed Description

Controller.

Author
  Dodonov A.A.

Definition at line 26 of file group_controller.php.

## Constructor & Destructor Documentation

__construct | ( |  | ) |

Constructor.

Author
  Dodonov A.A.

Definition at line 52 of file group_controller.php.

{
try
{
$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

controller | ( |  | $Options | ) |

Function controlls component.

Parameters

  $Options | - Settings.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 293 of file group_controller.php.

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

delete_group | ( |  | $Options | ) |

Function controlls component.

Parameters

  $Options | - Settings.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 126 of file group_controller.php.

{
try
{
$Permit = $this->Security->get_gp( 'permit' , 'command' );
$MasterType = $this->Security->get_gp( 'master_type' , 'command' );
if( $this->Security->get_gp( 'ids' , 'set' ) )
{
$MasterId = explode( ',' , $this->Security->get_gp( 'ids' , 'string' ) );
}
else
{
$MasterId = array( $this->Security->get_gp( 'master_id' , 'integer' ) );
}
$this->PermitAccess->delete_group_for_object( $Permit , $MasterId , $MasterType );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

on_set_single_group_for_object | ( |  | $Parameters | ) |

Function sets single group for user.

Parameters

  $Parameters | - Call parameters.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 250 of file group_controller.php.

{
try
{
if( $this->Security->get_gp( 'group_name' , 'set' , false ) &&
$this->PermitAlgorithms->object_has_permit( false , 'user' , 'permit_manager' ) )
{
$GroupAccess = get_package( 'permit::group_access' , 'last' , __FILE__ );
$MasterId = get_field( $Parameters , 'master_id' );
$MasterType = get_field( $Parameters , 'master_type' );
$this->clear_groups_for_object( $MasterId , $MasterType );
$GroupName = $this->Security->get_gp( 'group_name' , 'command' );
$GroupAccess->add_group_for_object( $GroupName , $MasterId , $MasterType );
}
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

set_group | ( |  | $Options | ) |

Function controlls component.

Parameters

  $Options | - Settings.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 84 of file group_controller.php.

{
try
{
$Permit = $this->Security->get_gp( 'permit' , 'command' );
$MasterType = $this->Security->get_gp( 'master_type' , 'command' );
if( $this->Security->get_gp( 'ids' , 'set' ) )
{
$MasterId = explode( ',' , $this->Security->get_gp( 'ids' , 'string' ) );
}
else
{
$MasterId = array( $this->Security->get_gp( 'master_id' , 'integer' ) );
}
$this->PermitAccess->set_group_for_object( $Permit , $MasterId , $MasterType );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

toggle_group | ( |  | $Options | ) |

Function controlls component.

Parameters

  $Options | - Settings.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 168 of file group_controller.php.

{
try
{
$Permit = $this->Security->get_gp( 'permit' , 'command' );
$MasterType = $this->Security->get_gp( 'master_type' , 'command' );
if( $this->Security->get_gp( 'ids' , 'set' ) )
{
$MasterId = explode( ',' , $this->Security->get_gp( 'ids' , 'string' ) );
}
else
{
$MasterId = array( $this->Security->get_gp( 'master_id' , 'integer' ) );
}
$this->PermitAccess->toggle_group_for_object( $Permit , $MasterId , $MasterType );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Field Documentation

$PermitAccess = false

Cached objects.

Author
  Dodonov A.A.

Definition at line 38 of file group_controller.php.

$PermitAlgorithms = false

Definition at line 39 of file group_controller.php.

$Security = false

Definition at line 40 of file group_controller.php.

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

- packages/permit/packages/group_controller/group_controller.php