?? placement.pm
字號:
# Copyright 2001-2005 Six Apart.# SCRiPTMAFiA 2005 - THE DiRTY HANDS ON YOUR SCRiPTS## $Id: Placement.pm 10197 2005-03-09 00:27:57Z ezra $package MT::Placement;use strict;use MT::Object;@MT::Placement::ISA = qw( MT::Object );__PACKAGE__->install_properties({ columns => [ 'id', 'blog_id', 'entry_id', 'category_id', 'is_primary', ], indexes => { blog_id => 1, entry_id => 1, category_id => 1, is_primary => 1, }, datasource => 'placement', primary_key => 'id',});1;__END__=head1 NAMEMT::Placement - Movable Type entry-category placement record=head1 SYNOPSIS use MT::Placement; my $place = MT::Placement->new; $place->entry_id($entry->id); $place->blog_id($entry->blog_id); $place->category_id($cat->id); $place->is_primary(1); $place->save or die $place->errstr;=head1 DESCRIPTIONAn I<MT::Placement> object represents a single entry-category assignment; inother words, I<MT::Placement> objects describe the assignment of entries intocategories. Each entry is assigned to one primary category and any number ofsecondary categories; an I<MT::Placement> object exists for each suchassignment. An entry's assignment to its primary category is marked as aprimary placement.=head1 USAGEAs a subclass of I<MT::Object>, I<MT::Placement> inherits all of thedata-management and -storage methods from that class; thus you should lookat the I<MT::Object> documentation for details about creating a new object,loading an existing object, saving an object, etc.=head1 DATA ACCESS METHODSThe I<MT::Placement> object holds the following pieces of data. These fieldscan be accessed and set using the standard data access methods described in theI<MT::Object> documentation.=over 4=item * idThe numeric ID of the placement.=item * entry_idThe numeric ID of the entry.=item * category_idThe numeric ID of the category.=item * is_primaryA boolean flag specifying whether the placement is a "primary" placement, andhence whether it represents the entry's primary category.=back=head1 DATA LOOKUPIn addition to numeric ID lookup, you can look up or sort records by anycombination of the following fields. See the I<load> documentation inI<MT::Object> for more information.=over 4=item * entry_id=item * category_id=item * is_primary=back=head1 AUTHOR & COPYRIGHTSPlease see the I<MT> manpage for author, copyright, and license information.=cut
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -