Exemplo n.º 1
0
 /**
  * Saves a permission object within the current application.
  *
  * @param UmgtPermission $permission the permission.
  *
  * @return int The id of the permission.
  *
  * @author Christian Achatz
  * @version
  * Version 0.1, 15.06.2008<br />
  * Version 0.2, 16.06.2008 (The permission set is lazy loaded when not present)<br />
  * Version 0.3, 28.12.2008 (Changed the API concerning the new UML diagram)<br />
  */
 public function savePermission(UmgtPermission &$permission)
 {
     $app = $this->getCurrentApplication();
     $permission->addRelatedObject('Application2Permission', $app);
     return $this->getORMapper()->saveObject($permission);
 }