NAME
Hyper::Control::Base::BTree - Tree Base Control
VERSION
This document describes Hyper::Control::Base::BTree 0.01
SYNOPSIS
use Hyper::Control::Base::BTree;
my $object = Hyper::Control::Base::BTree->new();
DESCRIPTION
Base Control for HTML Trees.
ATTRIBUTES
SUBROUTINES/METHODS
add_child
my $child = Hyper::Control::Base::BTree->new();
$child->set_data('this is a nice child');
$object->add_child($child);
Add a child to a tree object. Childs are Tree Objects too.
has_childs
my $has_childs = $object->has_childs();
Indicates if a tree has childs.
has_next_sibling
my $has_next_sibling = $object->has_next_sibling();
Indicates if a tree object has a next siblings.
has_previous_sibling
my $has_previous_sibling = $object->has_previous_sibling();
Indicates if a tree object has a previous siblings.
is_root
my $is_root = $object->is_root();
Indicates if a tree object has no parent node / if it's the root tree object.
get_html
my $html = $object->get_html();
Adjust $HTML::Template::Compiled::MAX_RECURSE and returns the rendered template.
get_template_childs
my $template_childs = $object->get_template_childs();
Some Template engines are very stupid. This method is a helper method which returns all childs of a tree object as an array of hash refs which look like [ { this => $child[0] }, { this => $child[1] }, ... ]
If you don't understand what I mean, take a closer look on the default HTC template of for this Control.
DIAGNOSTICS
CONFIGURATION AND ENVIRONMENT
DEPENDENCIES
version
Hyper::Control::Base
Class::Std::Storable
INCOMPATIBILITIES
BUGS AND LIMITATIONS
RCS INFORMATIONS
- Last changed by
-
$Author: ac0v $
- Id
-
$Id: BTree.pm 317 2008-02-16 01:52:33Z ac0v $
- Revision
-
$Revision: 317 $
- Date
-
$Date: 2008-02-16 02:52:33 +0100 (Sat, 16 Feb 2008) $
- HeadURL
-
$HeadURL: http://svn.hyper-framework.org/Hyper/Hyper/trunk/lib/Hyper/Control/Base/BTree.pm $
AUTHOR
Andreas Specht <ACID@cpan.org>
LICENSE AND COPYRIGHT
Copyright (c) 2007, Andreas Specht <ACID@cpan.org>
. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.