Changeset 224


Ignore:
Timestamp:
Apr 20, 2006, 3:04:03 PM (14 years ago)
Author:
nick
Message:

Start on documenting Plugin points

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki-toolkit/trunk/lib/Wiki/Toolkit/Plugin.pm

    r209 r224  
    2626  $wiki->register_plugin( plugin => $plugin );
    2727  my $node = $plugin->datastore->retrieve_node( "Home" );
     28
     29=head1 POSSIBLE METHODS
     30
     31=over 4
     32
     33=item B<pre_moderate>
     34
     35  * TODO *
     36
     37=item B<post_moderate>
     38
     39=item B<pre_rename>
     40
     41=item B<post_rename>
     42
     43=item B<pre_retrieve>
     44
     45  Called before a retrieve is performed.
     46  Allows changes to the parameters used by retrieve.
     47
     48  my %args = @_;
     49  my ($name_ref,$version_ref) = @args{ qw( node version ) };
     50  $$name_ref =~ s/\s/_/g;
     51
     52  TODO: Allow declining of the read.
     53
     54=item B<pre_write>
     55
     56  Called before a write is performed.
     57  Allows changes to the parameters used by the write;
     58
     59  my %args = @_;
     60  my ($node_ref,$content_ref,$metadata_ref) =
     61      @args{ qw( node content metadata ) };
     62  $$content_ref =~ s/\bpub\b/Pub/g;
     63
     64  TODO: Allow declining of the read.
     65
     66=item B<post_write>
     67
     68  Called after a write has been performed.
     69  Allows additional actions to occur after node writes.
     70
     71  my %args = @_;
     72  my ($node,$node_id,$version,$content,$metadata) =
     73     @args{ qw( node node_id version content metadata ) };
     74  &log_node_write($node,gmtime);
     75
     76=item B<post_delete>
     77
     78=back
    2879
    2980=head1 METHODS
Note: See TracChangeset for help on using the changeset viewer.