Class: RightAdminService

Source Location: /CORE/system/classes/right/RightAdminService.php

Class RightAdminService

Class Overview

The RightAdminService is used for creating and deleting Right entrys.

Initialize this Service with a Itemtype to work with.

Located in /CORE/system/classes/right/RightAdminService.php [line 36]



		
				Author(s):
		
  • Kevin Papst
Information Tags:
Version:  $Id: RightAdminService.php,v 1.8 2007/04/19 19:40:14 kpapst Exp $
Copyright:  Copyright (C) 2002-2006 Kevin Papst
License:  GNU Public License

Methods

[ Top ]
Method Summary
RightAdminService   RightAdminService()   This initalizes the AdminService with the correct Itemtype.
void   changeRight()  
boolean   checkForExistence()   Checks if a Right exists for the given Group and Item ID.
void   createGroupRight()   Creates a Right entry for the given Group.
void   createRightCopy()   Creates a right copy for all Right entrys by selecting all from the Parent and applying them to the Child.
Object   deleteGroupRight()   Delete the special right entry that belong to the given Group and Item.
Object   deleteItemRights()   Delete all right entrys that belong to the given Item ID

[ Top ]
Methods
Constructor RightAdminService  [line 47]

  RightAdminService RightAdminService( int $itemtype  )

This initalizes the AdminService with the correct Itemtype.

Parameters:
int   $itemtype:  itemtype the Itemtype to handle the rights for


[ Top ]
changeRight  [line 99]

  void changeRight( $group_id, $itemid, $value  )

Parameters:
   $group_id: 
   $itemid: 
   $value: 


[ Top ]
checkForExistence  [line 88]

  boolean checkForExistence( int $group, int $itemid  )

Checks if a Right exists for the given Group and Item ID.

Parameters:
int   $group:  the Group ID to check
int   $itemid:  the ItemID to check

API Tags:
Return:  whether a Right exists or not


[ Top ]
createGroupRight  [line 136]

  void createGroupRight( $group_id, $itemid, $value  )

Creates a Right entry for the given Group.

If there is already an enry for this group existing, this one will be changed.

Parameters:
   $group_id: 
   $itemid: 
   $value: 


[ Top ]
createRightCopy  [line 117]

  void createRightCopy( long $parent, long $child  )

Creates a right copy for all Right entrys by selecting all from the Parent and applying them to the Child.

The Parent must NOT be the real Item Parent of the Child!

Parameters:
long   $parent:  parent the Item ID of the Item to creates a righty copy from
long   $child:  child the ItemID of the Item to create the right entrys for


[ Top ]
deleteGroupRight  [line 72]

  Object deleteGroupRight( int $group_id, int $itemid  )

Delete the special right entry that belong to the given Group and Item.

Parameters:
int   $group_id:  the Group ID
int   $itemid:  the Item ID

API Tags:
Return:  the DB Result


[ Top ]
deleteItemRights  [line 57]

  Object deleteItemRights( int $itemid  )

Delete all right entrys that belong to the given Item ID

Parameters:
int   $itemid:  the Item ID

API Tags:
Return:  the DB Result


[ Top ]