Gadgets::Standard::Post.pm
NAME
Gadgets::Standars::Post - Post creation and management
METHODS
my $post = Gadgets::Standard::Post->new ( [parent_key => doc_key] )
my $reply = Gadgets::Standars::Post->new( parent_key => $parent->doc_key );
Creates a new Post doc and returns it. Takes optional named paramater
"parent_key", which is the doc_key of the parent of this post (for
replies)
my $post = Gadgets::Standard::Post->get_by_title( "title" )
my $post = Gadgets::Standars::Post->get_by_title( "Wiki Documentation" );
Returns most recently created Post titled "title", or undef.
my $post = Gadgets::Standard::Post->get_by_id ( "doc_id" )
my $post = Gadgets::Standars::Post->get_by_id( "1234adsf" );
Returns Post of id "doc_id", or undef.
my $post = Gadgets::Standard::Post->get_by_key ( "doc_key" )
my $post = Gadgets::Standars::Post->get_by_key( "Post|main|1234asfd" );
Returns Post of key "doc_key", or undef.
my $it = Gadgets::Standard::Post->iterator( %args )
my $it = Gadgets::Standars::Post->iterator( %iter_args );
Convenience wrapper for
XML::Comma::Def->Post
->get_index("main")
->iterator ( %iter_args )
my @kids = Gadgets::Standard::Post->get_descendant_keys( "doc_key" )
my @descendants =
Gadgets::Standars::Post->get_descendant_keys( $post->doc_key );
returns a list of descendants of doc_key
$post->world_readable
$post->world_readable and show();
returns true if the post is world readable, false otherwise.
$post->check_authz ( $user, "perm_type" );
Where "perm_type" is "read", "write" or "post"
my $can_read = $post->check_authz( $user, "read" );
$post->top_parent
my $originator = $self->top_parent;
returns the top parent doc object, or $self if we have no ancestors.
$post->top_parent_key
my $originator = $self->top_parent_key;
returns the top parent doc_key, or $self->doc_key if we have no
ancestors.
ADGETS