Copyright 2003-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
저자: Marko Djukic (marko@oblo.com)
저자: Michael Slusarz (slusarz@horde.org)
저자: Jan Schneider (jan@horde.org)
상속: implements Countable
예제 #1
0
파일: Base.php 프로젝트: jubinpatel/horde
 /**
  * Sorts the tree by the specified node property.
  *
  * @param string $criteria  The node property to sort by.
  */
 public function sort($criteria)
 {
     return $this->_tree->sort($criteria);
 }
예제 #2
0
파일: Select.php 프로젝트: horde/horde
 /**
  * The string tree representation.
  * NOTE: The <select> and </select> tags are NOT included in
  * the output.
  *
  * @return string  A string containing <option> elements for each mailbox
  *                 in the list.
  */
 public function __toString()
 {
     return $this->_tree->getTree();
 }
예제 #3
0
파일: groups.php 프로젝트: Artea/freebeer
    include HORDE_TEMPLATES . '/admin/groups/' . $form;
}
/* Get the perms tree. */
$nodes = $groups->_datatree->get(DATATREE_FORMAT_FLAT, -1, true);
/* Set up some node params. */
$spacer = '&nbsp;&nbsp;&nbsp;&nbsp;';
$current = Util::getFormData('cid');
$icondir = array('icondir' => $registry->getParam('graphics'));
$group_node = $icondir + array('icon' => 'group.gif');
$add = Horde::applicationUrl('admin/groups.php?actionID=addchild');
$edit = Horde::applicationUrl('admin/groups.php?actionID=edit');
$delete = Horde::applicationUrl('admin/groups.php?actionID=delete');
$edit_img = Horde::img('edit.gif', _("Edit Group"), 'hspace="2"');
$delete_img = Horde::img('delete.gif', _("Delete Group"), 'hspace="2"');
/* Set up the tree. */
$tree =& Horde_Tree::singleton('datatree', 'javascript');
$tree->setOption(array('border' => '0', 'class' => 'item', 'cellpadding' => '0', 'cellspacing' => '0', 'alternate' => true));
foreach ($nodes as $cid => $node) {
    $node_class = $current == $cid ? array('class' => 'selected') : array();
    if ($cid == -1) {
        $add_img = Horde::img('group.gif', _("Add New Group"), 'hspace="2"');
        $add_link = Horde::link(Util::addParameter($add, 'cid', $cid), _("Add New Group")) . $add_img . '</a>';
        $base_node_params = $icondir + array('icon' => 'administration.gif');
        $tree->addNode($cid, null, _("All Groups"), 0, true, $base_node_params + $node_class, array($spacer, $add_link));
    } else {
        $add_img = Horde::img('group.gif', _("Add Child Group"), 'hspace="2"');
        $add_link = Horde::link(Util::addParameter($add, 'cid', $cid), _("Add Child Group")) . $add_img . '</a>';
        $edit_link = Horde::link(Util::addParameter($edit, 'cid', $cid), _("Edit Group")) . $edit_img . '</a>';
        $delete_link = Horde::link(Util::addParameter($delete, 'cid', $cid), _("Delete Group")) . $delete_img . '</a>';
        $parent_id = $groups->_datatree->getParent($node);
        $group_extra = array($spacer, $add_link, $edit_link, $delete_link);