| Pangloss documentation | Contained in the Pangloss distribution. |
Pangloss::Segment::ModifyTermStatus - modify a term's status.
$pipe->add_segment( Pangloss::Segment::ModifyTermStatus->new )
This class inherits its interface from Pipeline::Segment.
On dispatch(), if the request has an 'modify_term' argument, attempts to modify the term specified by 'selected_term' and return the resulting view or error.
Steve Purkis <spurkis@quiup.com>
| Pangloss documentation | Contained in the Pangloss distribution. |
package Pangloss::Segment::ModifyTermStatus; use Pangloss::Term::Status; use base qw( Pipeline::Segment ); our $VERSION = ((require Pangloss::Version), $Pangloss::VERSION)[1]; our $REVISION = (split(/ /, ' $Revision: 1.5 $ '))[2]; sub dispatch { my $self = shift; my $request = $self->store->get('OpenFrame::Request') || return; my $app = $self->store->get('Pangloss::Application') || return; my $status = $self->store->get('Pangloss::Term::Status') || return; my $view = $self->store->get('Pangloss::Application::View'); my $args = $request->arguments; if ($args->{modify_term_status}) { my $key = $args->{selected_term}; $self->emit( "modifying term status of $key" ); return $app->term_editor->modify_status( $key, $status, $view ); } } 1; __END__ #------------------------------------------------------------------------------