NAME
MT::Placement - Movable Type entry-category placement record
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;
DESCRIPTION
An MT::Placement object represents a single entry-category assignment; in other words, MT::Placement objects describe the assignment of entries into categories. Each entry is assigned to one primary category and any number of secondary categories; an MT::Placement object exists for each such assignment. An entry's assignment to its primary category is marked as a primary placement.
USAGE
As a subclass of MT::Object, MT::Placement inherits all of the data-management and -storage methods from that class; thus you should look at the MT::Object documentation for details about creating a new object, loading an existing object, saving an object, etc.
DATA ACCESS METHODS
The MT::Placement object holds the following pieces of data. These fields can be accessed and set using the standard data access methods described in the MT::Object documentation.
- id
The numeric ID of the placement.
- entry_id
The numeric ID of the entry.
- category_id
The numeric ID of the category.
- is_primary
A boolean flag specifying whether the placement is a "primary" placement, and hence whether it represents the entry's primary category.
DATA LOOKUP
In addition to numeric ID lookup, you can look up or sort records by any combination of the following fields. See the load documentation in MT::Object for more information.
- entry_id
- category_id
- is_primary
AUTHOR & COPYRIGHTS
Please see the MT manpage for author, copyright, and license information.