Changeset 355


Ignore:
Timestamp:
Nov 10, 2006, 8:28:04 PM (14 years ago)
Author:
nick
Message:

Give the wiki object to plugins, in case they need it

Location:
wiki-toolkit/trunk/lib/Wiki
Files:
2 edited

Legend:

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

    r351 r355  
    787787    croak "no plugin supplied" unless $plugin;
    788788    if ( $plugin->isa( "Wiki::Toolkit::Plugin" ) ) {
     789        $plugin->wiki(      $self             );
    789790        $plugin->datastore( $self->store      );
    790791        $plugin->indexer(   $self->search_obj );
  • wiki-toolkit/trunk/lib/Wiki/Toolkit/Plugin.pm

    r236 r355  
    164164}
    165165
     166=item B<wiki>
     167
     168Returns the Wiki::Toolkit object, or C<undef> if the C<register_plugin>
     169method hasn't been called on a L<Wiki::Toolkit> object yet.
     170
     171=cut
     172
     173sub wiki {
     174    my $self = shift;
     175    $self->{_wiki} = $_[0] if $_[0];
     176    return $self->{_wiki};
     177}
     178
    166179=item B<datastore>
    167180
Note: See TracChangeset for help on using the changeset viewer.