Bric::Biz::OutputChannel::Element - Maps Output Channels to Element Types.
$LastChangedRevision$
$LastChangedDate$
use Bric::Biz::OutputChannel::Element;
# Constructors.
my $oce = Bric::Biz::OutputChannel->new($init);
my $oces_href = Bric::Biz::OutputChannel->href($params);
# Instance methods.
my $element_type_id = $oce->get_element_type_id;
$oce->set_element_type_id($element_type_id);
$oce->set_enabled_on;
$oce->set_enabled_off;
if ($oce->is_enabled) { } # do stuff.
$oce->save;
This subclass of Bric::Biz::OutputChannel manages the relationship between output channels and elements (Bric::Biz::ElementType objects). It does so by providing accessors to properties relevant to the relationship, as well as an href() method to help along the use of a Bric::Util::Coll object.
This class inherits the majority of its interface from Bric::Biz::OutputChannel. Only additional methods are documented here.
Constructs a new Bric::Biz::OutputChannel::Element object intialized with the values in the $init hash reference and returns it. The suported values for the $init hash reference are the same as those supported by Bric::Biz::OutputChannel::Element->new, with the addition of the following:
oc_id
The ID of the output channel object on which the new Bric::Biz::OutputChannel::Element will be based. The relevant Bric::Biz::OutputChannel object will be looked up from the database. Note that all of the $init parameters documented in Bric::Biz::OutputChannel will be ignored if this parameter is passed.
oc
The output channel object on which the new Bric::Biz::OutputChannel::Element will be based. Note that all of the $init parameters documented in Bric::Biz::OutputChannel will be ignored if this parameter is passed.
element_type_id
The ID of the Bric::Biz::ElementType object to which this output channel is mapped.
enabled
A boolean value indicating whether the output channel will have assets output to it by default.
Throws:
Side Effects: If you pass in an output channel object via the oc parameter, that output channel object will be converted into a Bric::Biz::OutputChannel::Element object.
Notes: NONE.
Returns a hash reference of Bric::Biz::OutputChannel::Element objects. Each hash key is a Bric::Biz::OutputChannel::Element ID, and the values are the corresponding Bric::Biz::OutputChannel::Element objects. Only a single parameter argument is allowed, element_type_id, though ANY may be used to specify a list of element type IDs. All of the output channels associated with that element type ID will be returned.
Throws:
Side Effects: NONE.
Notes: NONE.
##############################################################################
Returns the ID of the Element Type definition with which this output channel is associated.
Throws: NONE.
Side Effects: NONE.
Notes: NONE.
Sets the ID of the Element type definition with which this output channel is associated.
Throws: NONE.
Side Effects: NONE.
Notes: NONE.
Enables this output channel to have assets ouptut to it by default.
Throws: NONE.
Side Effects: NONE.
Notes: NONE.
Sets this output channel to not have assets ouptut to it by default.
Throws: NONE.
Side Effects: NONE.
Notes: NONE.
Returns true if the this output channel is set to have assets output to it by default, and false if it is not.
Throws: NONE.
Side Effects: NONE.
Notes: NONE.
Marks this output channel-element type association to be removed. Call the save() method to remove the mapping from the database.
Throws: NONE.
Side Effects: NONE.
Notes: NONE.
Saves the output channel.
Throws:
Side Effects: NONE.
Notes: NONE.
NONE.
David Wheeler