Return a Horde_Tree representation of the permissions tree.
public renderTree ( $current = Horde_Perms::ROOT ) : string | ||
Результат | string | The html showing the permissions as a Horde_Tree. |
Horde::url('admin/perms/index.php', true)->redirect(); } /* Set up form. */ $ui = new Horde_Core_Perms_Ui($perms, $corePerms); $ui->setVars($vars); $ui->setupAddForm($permission); if ($ui->validateAddForm($info)) { try { if ($info['perm_id'] == Horde_Perms::ROOT) { $child = $corePerms->newPermission($info['child']); $result = $perms->addPermission($child); } else { $pOb = $perms->getPermissionById($info['perm_id']); $name = $pOb->getName() . ':' . str_replace(':', '.', $info['child']); $child = $corePerms->newPermission($name); $result = $perms->addPermission($child); } $notification->push(sprintf(_("\"%s\" was added to the permissions system."), $corePerms->getTitle($child->getName())), 'horde.success'); Horde::url('admin/perms/edit.php', true)->add('perm_id', $child->getId())->redirect(); } catch (Exception $e) { Horde::log($e, 'ERR'); $notification->push(sprintf(_("\"%s\" was not created: %s."), $corePerms->getTitle($child->getName()), $e->getMessage()), 'horde.error'); } } $page_output->header(array('title' => _("Permissions Administration"))); require HORDE_TEMPLATES . '/admin/menu.inc'; /* Render the form and tree. */ $ui->renderForm('addchild.php'); echo '<br />'; $ui->renderTree($perm_id); $page_output->footer();