ultimix
group_markup_1_0_0 Class Reference

Public Member Functions

 __construct ()
 compile_group_list (&$Settings)
 compile_group_list_for_object (&$Settings)
 compile_group_list_widget (&$Settings)
 compile_group_select (&$Settings)

Data Fields

 $CachedMultyFS = false
 $Database = false
 $GroupAccess = false
 $PermitAlgorithms = false
 $UserAlgorithms = false
 $ControllerWasAdded = false

Detailed Description

Class provides permits dependent visualisation.

Author
Dodonov A.A.

Definition at line 26 of file group_markup.php.

Constructor & Destructor Documentation

__construct ( )

Constructor.

Author
Dodonov A.A.

Definition at line 66 of file group_markup.php.

{
try
{
$this->CachedMultyFS = get_package( 'cached_multy_fs' , 'last' , __FILE__ );
$this->Database = get_package( 'database' , 'last' , __FILE__ );
$this->GroupAccess = get_package( 'permit::group_access' , 'last' , __FILE__ );
$this->PermitAlgorithms = get_package( 'permit::permit_algorithms' , 'last' , __FILE__ );
$this->UserAlgorithms = get_package( 'user::user_algorithms' , 'last' , __FILE__ );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

Member Function Documentation

compile_group_list ( $Settings)

Function compiles macro 'group_list'.

Parameters
$Settings- Compilation parameters.
Returns
Widget.
Exceptions
ExceptionAn exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 104 of file group_markup.php.

{
try
{
$this->Database->query_as( DB_OBJECT );
$Items = $this->Database->select( 'title' , '`umx_group`' , '1' );
$c = count( $Items );
$AllGroups = '';
foreach( $Items as $k => $i )
{
$AllGroups .= $i->title;
if( $k + 1 != $c )
{
$AllGroups .= ', ';
}
}
return( $AllGroups );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
compile_group_list_for_object ( $Settings)

Function compiles macro 'group_list'.

Parameters
$Settings- Compilation parameters.
Returns
Widget.
Exceptions
ExceptionAn exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 150 of file group_markup.php.

{
try
{
$GroupList = '';
if( $this->PermitAlgorithms->object_has_permit( false , 'user' , 'permit_manager' ) )
{
list( $Object , $Type ) = $Settings->get_settings( 'object,type' , 'public,' );
$GroupList = $this->GroupAccess->get_groups_for_object( $Object , $Type );
sort( $GroupList );
$GroupList = implode( ', ' , $GroupList );
}
return( $GroupList );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
compile_group_list_widget ( $Settings)

Function compiles macro 'group_list_widget'.

Parameters
$Settings- Compilation parameters.
Returns
Widget.
Exceptions
ExceptionAn exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 352 of file group_markup.php.

{
try
{
list( $ObjectGroupList , $AllGroupList ) = $this->get_groups( $Settings );
$GroupListWidget = $this->CachedMultyFS->get_template( __FILE__ , 'group_list.tpl' );
$Object = $Settings->get_setting( 'object' );
$GroupListWidget = str_replace( '{object}' , $Object , $GroupListWidget );
$GroupListWidget = $this->compile_object_groups( $ObjectGroupList , $GroupListWidget );
return( $this->compile_all_groups( $AllGroupList , $ObjectGroupList , $GroupListWidget ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
compile_group_select ( $Settings)

Function compiles macro 'group_list_widget'.

Parameters
$Settings- Compilation parameters.
Returns
Widget.
Exceptions
ExceptionAn exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 394 of file group_markup.php.

{
try
{
list( $Name , $Class ) = $Settings->get_settings( 'name,class', 'group,flat width_160' );
$Code = "{select:name=$Name;class=$Class;".
"query=SELECT id , title AS value FROM `umx_group` ORDER BY title}";
return( $Code );
}
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_markup.php.

$ControllerWasAdded = false

Was the controller added.

Author
Dodonov A.A.

Definition at line 54 of file group_markup.php.

$Database = false

Definition at line 39 of file group_markup.php.

$GroupAccess = false

Definition at line 40 of file group_markup.php.

$PermitAlgorithms = false

Definition at line 41 of file group_markup.php.

$UserAlgorithms = false

Definition at line 42 of file group_markup.php.


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