/sprout/Controllers/Admin/PageAdminController.php Highlighted file source
Line 64: use Sprout\Helpers\Treenode;
Line 592: $new_root = new Treenode();
Line 600: self::renderPreviewTreenode($child);
Line 614: private static function renderPreviewTreenode($node)
Line 621: self::renderPreviewTreenode($child);
Line 735: $tree = new Treenode();
Line 736: $node = new Treenode();
Line 755: $new_root = new Treenode();
Line 770: $result = $this->createPageTreenode($child, (int)$_POST['parent_id'], $images, $headings, $operator);
Line 784: private function createPageTreenode($node, $parent_id, $images, $headings, $operator)
Line 840: $count += $this->createPageTreenode($child, $page_id, $images, $headings, $operator);
/sprout/Controllers/Admin/PageAdminController.php Highlighted file source
Line 64: use Sprout\Helpers\Treenode;
Line 592: $new_root = new Treenode();
Line 600: self::renderPreviewTreenode($child);
Line 614: private static function renderPreviewTreenode($node)
Line 621: self::renderPreviewTreenode($child);
Line 735: $tree = new Treenode();
Line 736: $node = new Treenode();
Line 755: $new_root = new Treenode();
Line 770: $result = $this->createPageTreenode($child, (int)$_POST['parent_id'], $images, $headings, $operator);
Line 784: private function createPageTreenode($node, $parent_id, $images, $headings, $operator)
Line 840: $count += $this->createPageTreenode($child, $page_id, $images, $headings, $operator);
/sprout/Helpers/Fb.php Highlighted file source
Line 1059: * Generates a dropdown selection menu from a Treenode and its children
Line 1066: * 'root' Treenode Tree root - Required
Line 1079: if (empty($options['root']) or !($options['root'] instanceof Treenode)) {
Line 1080: throw new InvalidArgumentException('Option "root" is required and must be a Treenode');
/sprout/Helpers/Fb.php Highlighted file source
Line 1059: * Generates a dropdown selection menu from a Treenode and its children
Line 1066: * 'root' Treenode Tree root - Required
Line 1079: if (empty($options['root']) or !($options['root'] instanceof Treenode)) {
Line 1080: throw new InvalidArgumentException('Option "root" is required and must be a Treenode');
/sprout/Helpers/Navigation.php Highlighted file source
Line 29: /** @var TreeNodeMatcher|null */
Line 39: * @param TreeNodeMatcher $page_node_matcher The matcher to use
Line 49: * @return TreeNodeMatcher The matcher being used.
Line 197: self::$root_node->filterChildren(new TreenodeInMenuMatcher());
Line 286: self::$root_node->filterChildren(new TreenodeInMenuMatcher());
Line 372: self::$root_node->filterChildren(new TreenodeInMenuMatcher());
Line 460: self::$root_node->filterChildren(new TreenodeInMenuMatcher());
Line 462: $page = self::$root_node->findNode(new TreenodePathMatcher($page_url));
Line 606: self::$root_node->filterChildren(new TreenodeInMenuMatcher());
Line 729: * Finds the node in the page tree which matched the specified {@see TreenodeMatcher}.
Line 731: * @return Treenode|null null if no node is found, or if the matcher does not exist
Line 758: self::$root_node->filterChildren(new TreenodeInMenuMatcher());
/sprout/Helpers/Navigation.php Highlighted file source
Line 29: /** @var TreeNodeMatcher|null */
Line 39: * @param TreeNodeMatcher $page_node_matcher The matcher to use
Line 49: * @return TreeNodeMatcher The matcher being used.
Line 197: self::$root_node->filterChildren(new TreenodeInMenuMatcher());
Line 286: self::$root_node->filterChildren(new TreenodeInMenuMatcher());
Line 372: self::$root_node->filterChildren(new TreenodeInMenuMatcher());
Line 460: self::$root_node->filterChildren(new TreenodeInMenuMatcher());
Line 462: $page = self::$root_node->findNode(new TreenodePathMatcher($page_url));
Line 606: self::$root_node->filterChildren(new TreenodeInMenuMatcher());
Line 729: * Finds the node in the page tree which matched the specified {@see TreenodeMatcher}.
Line 731: * @return Treenode|null null if no node is found, or if the matcher does not exist
Line 758: self::$root_node->filterChildren(new TreenodeInMenuMatcher());
/sprout/Helpers/NavigationMenu.php Highlighted file source
Line 57: $root->filterChildren(new TreenodeInMenuMatcher());
Line 91: $items = $root->findAllNodes(new TreenodeValueMatcher('menu_group', $group_id));
Line 149: * @param Treenode $node The node which is being rendered
Line 152: * @param Treenode $selected_node The page the user is currently looking at
Line 153: * @param array $selected_ancestors All ancestors of the selected node ({@see Treenode::find_ancestors})
Line 157: public static function determineClasses(Treenode $node, $depth, $index, $selected_node, array $selected_ancestors, $has_children) {
Line 177: * @param Treenode $parent_node The node which is being rendered
Line 178: * @param array $groups The groups of items to render, in the format [name => array of Treenode, ...]
Line 179: * @param Treenode $selected_node The page the user is currently looking at
Line 180: * @param array $selected_ancestors All ancestors of the selected node ({@see Treenode::find_ancestors})
Line 183: protected static function subMenu(Treenode $parent_node, array $groups, $selected_node, array $selected_ancestors) {
/sprout/Helpers/Page.php Highlighted file source
Line 37: $matcher = new TreenodePathMatcher($url);
Line 78: $matcher = new TreenodeFrontendMatcher($class, $method);
Line 395: $matcher = new TreenodeIdsMatcher([$page_id]);
Line 404: $top_anc->filterChildren(new TreenodeInMenuMatcher());
Line 424: * @param TreeNode $node The node to traverse
/sprout/Helpers/Treenode.php Highlighted file source
Line 27: class Treenode implements ArrayAccess
Line 70: * @return Treenode The loaded tree
Line 88: $nodes[] = new Treenode($row);
Line 93: $root_node = new Treenode(array('id' => 0));
Line 130: * @return TreeNode if found, null if not found.
Line 152: * @param TreenodeMatcher $matcher The matcher to use for finding the node.
Line 155: public function findNode(TreenodeMatcher $matcher)
Line 178: * @param TreenodeMatcher $matcher The matcher to use for finding the nodes.
Line 181: public function findAllNodes(TreenodeMatcher $matcher)
Line 238: * Filter the children of this node, removing any children which don't match the specified TreenodeMatcher.
Line 242: public function filterChildren(TreenodeMatcher $matcher)
Line 332: * Generic field getter for unknown properties - used for TreeNode->children
Line 348: * Generic field getter for unknown properties - used for TreeNode->children
/sprout/Helpers/Treenode.php Highlighted file source
Line 27: class Treenode implements ArrayAccess
Line 70: * @return Treenode The loaded tree
Line 88: $nodes[] = new Treenode($row);
Line 93: $root_node = new Treenode(array('id' => 0));
Line 130: * @return TreeNode if found, null if not found.
Line 152: * @param TreenodeMatcher $matcher The matcher to use for finding the node.
Line 155: public function findNode(TreenodeMatcher $matcher)
Line 178: * @param TreenodeMatcher $matcher The matcher to use for finding the nodes.
Line 181: public function findAllNodes(TreenodeMatcher $matcher)
Line 238: * Filter the children of this node, removing any children which don't match the specified TreenodeMatcher.
Line 242: public function filterChildren(TreenodeMatcher $matcher)
Line 332: * Generic field getter for unknown properties - used for TreeNode->children
Line 348: * Generic field getter for unknown properties - used for TreeNode->children
/sprout/Helpers/TreenodeMatcher.php Highlighted file source
Line 21: * Interface for matching nodes in the treenode
Line 23: interface TreenodeMatcher {
Line 28: * @param TreeNode $node The treenode to do matching against
Line 36: * @param TreeNode $node The treenode which is about to be descended into
Line 44: * @param TreeNode $node The treenode which has just ascended.
/sprout/tests/DocImport/docImportTest.php Highlighted file source
Line 15: use Sprout\Helpers\Treenode;
Line 130: * Test treenode building from headings
Line 138: $this->assertTrue($tree instanceof Treenode);
Line 140: $this->assertTrue($tree->children[0] instanceof Treenode);
Line 211: * Test treenode building - three levels
Line 221: $this->assertTrue($node0 instanceof Treenode);
Line 227: $this->assertTrue($node1 instanceof Treenode);
Line 234: $this->assertTrue($node2 instanceof Treenode);
Line 246: * Test treenode building - include body
Line 254: $this->assertTrue($tree instanceof Treenode);
Line 256: $this->assertTrue($tree->children[0] instanceof Treenode);
Line 262: $this->assertTrue($tree instanceof Treenode);
Line 264: $this->assertTrue($tree->children[0] instanceof Treenode);
Line 270: $this->assertTrue($tree instanceof Treenode);
Line 272: $this->assertTrue($tree->children[0] instanceof Treenode);
Line 275: $this->assertTrue($tree->children[1] instanceof Treenode);
/sprout/tests/DocImport/docImportTest.php Highlighted file source
Line 15: use Sprout\Helpers\Treenode;
Line 130: * Test treenode building from headings
Line 138: $this->assertTrue($tree instanceof Treenode);
Line 140: $this->assertTrue($tree->children[0] instanceof Treenode);
Line 211: * Test treenode building - three levels
Line 221: $this->assertTrue($node0 instanceof Treenode);
Line 227: $this->assertTrue($node1 instanceof Treenode);
Line 234: $this->assertTrue($node2 instanceof Treenode);
Line 246: * Test treenode building - include body
Line 254: $this->assertTrue($tree instanceof Treenode);
Line 256: $this->assertTrue($tree->children[0] instanceof Treenode);
Line 262: $this->assertTrue($tree instanceof Treenode);
Line 264: $this->assertTrue($tree->children[0] instanceof Treenode);
Line 270: $this->assertTrue($tree instanceof Treenode);
Line 272: $this->assertTrue($tree->children[0] instanceof Treenode);
Line 275: $this->assertTrue($tree->children[1] instanceof Treenode);
A total of 279 lines in 57 files were found