Bric::Util::Grp::PartsUsermContribuBric::Util::Grp::Parts::Member::Contrib(3p)



NAME
       Bric::Util::Grp::Parts::Member::Contrib - Manages Contributors (members
       of Bric::Util::Grp::Person groups, that is).

VERSION
       $LastChangedRevision$

DATE
       $LastChangedDate: 2006-03-18 01:26:34 +0100 (Sat, 18 Mar 2006) $

SYNOPSIS
       See Bric::Util::Grp::Parts::Member.

DESCRIPTION
       See Bric::Util::Grp::Parts::Member.

INTERFACE
   Constructors
       See Bric::Util::Grp::Parts::Member. Only lookup() is implemented here.

       my $contrib = Bric::Util::Grp::Parts::Member::Contrib->lookup({ id =>
       $id })
           Looks up and instantiates a new
           Bric::Util::Grp::Parts::Member::Contrib object based on the
           Bric::Util::Grp::Parts::Member::Contrib object ID passed. If $id is
           not found in the database, lookup() returns undef.

           Throws:

           o   Too many Bric::Util::Grp::Parts::Member::Contrib objects found.

           o   Unable to prepare SQL statement.

           o   Unable to connect to database.

           o   Unable to select column into arrayref.

           o   Unable to execute SQL statement.

           o   Unable to bind to columns to statement handle.

           o   Unable to fetch row from statement handle.

           Side Effects: If $id is found, populates the new
           Bric::Util::Grp::Parts::Member::Contrib object with data from the
           database before returning it.

           Notes: NONE.

   Destructors
       $contrib->DESTROY
           Dummy method to prevent wasting time trying to AUTOLOAD DESTROY.

           Throws: NONE.

           Side Effects: NONE.

           Notes: NONE.

   Public Class Methods
       See Bric::Util::Grp::Parts::Member. Only my_meths() is overridden here.

       $meths = Bric::Util::Grp::Parts::Member::Contrib->my_meths
       (@meths || $meths_aref) =
       Bric::Util::Grp::Parts::Member::Contrib->my_meths(TRUE)
       my (@meths || $meths_aref) =
       Bric::Util::Grp::Parts::Member::Contrib->my_meths(0, TRUE)
           Returns an anonymous hash of introspection data for this object. If
           called with a true argument, it will return an ordered list or
           anonymous array of introspection data. If a second true argument is
           passed instead of a first, then a list or anonymous array of
           introspection data will be returned for properties that uniquely
           identify an object (excluding "id", which is assumed).

           Each hash key is the name of a property or attribute of the object.
           The value for a hash key is another anonymous hash containing the
           following keys:

           name
               The name of the property or attribute. Is the same as the hash
               key when an anonymous hash is returned.

           disp
               The display name of the property or attribute.

           get_meth
               A reference to the method that will retrieve the value of the
               property or attribute.

           get_args
               An anonymous array of arguments to pass to a call to get_meth
               in order to retrieve the value of the property or attribute.

           set_meth
               A reference to the method that will set the value of the
               property or attribute.

           set_args
               An anonymous array of arguments to pass to a call to set_meth
               in order to set the value of the property or attribute.

           type
               The type of value the property or attribute contains. There are
               only three types:

               short
               date
               blob
           len If the value is a 'short' value, this hash key contains the
               length of the field.

           search
               The property is searchable via the list() and list_ids()
               methods.

           req The property or attribute is required.

           props
               An anonymous hash of properties used to display the property or
               attribute.  Possible keys include:

               type
                   The display field type. Possible values are

                   text
                   textarea
                   password
                   hidden
                   radio
                   checkbox
                   select
               length
                   The Length, in letters, to display a text or password
                   field.

               maxlength
                   The maximum length of the property or value - usually
                   defined by the SQL DDL.

           rows
               The number of rows to format in a textarea field.

           cols
               The number of columns to format in a textarea field.

           vals
               An anonymous hash of key/value pairs reprsenting the values and
               display names to use in a select list.

           Throws: NONE.

           Side Effects: NONE.

           Notes: NONE.

   Public Instance Methods
       See Also Bric::Util::Grp::Parts::Member.

       $roles = $contrib->get_roles
           Return the roles for this contributor

           Throws: NONE.

           Side Effects: NONE.

           Notes: NONE.

       $info = $contrib->get_role_info
           Return information for a particular role

           Throws: NONE.

           Side Effects: NONE.

           Notes: NONE.

       $person = $contrib->get_person
           Return the person object behind this contributor

           Throws: NONE.

           Side Effects: NONE.

           Notes: NONE.

       my $val = $contrib->get_data($attr);
           Shortcut for the default method of getting attributes from a group
           member, which is

             $member->get_attr({ name => $attr });

           By including this convenience method, contributor objects act more
           like story elements, so it'll be easier for template writers to
           use.

       $ids = $obj->get_grp_ids();
           Get a list of grp IDs of groups this object belongs to. Overrides
           the default implementation because it needs the group memeberships
           of the underlying person object, rather than of the contributor
           object.

           Throws:

           NONE

           Side Effects:

           NONE

           Notes:

           NONE

PRIVATE
   Private Class Methods
       See Bric::Util::Grp::Parts::Member.

   Private Instance Methods
       my (@contribs || $contribs_aref) = $member->_do_list($params)
           Returns a list or anonymous array of members of a
           Bric::Util::Grp::Person group or groups. The supported keys for the
           $params anonymous hash are:

           o   lname

           o   fname

           o   mname

           o   prefix

           o   suffix

           o   no_grp_id - Excludes members of the group with this ID.

           o   grp

           o   grp_id

           o   active

           Throws:

           o   Unable to prepare SQL statement.

           o   Unable to connect to database.

           o   Unable to execute SQL statement.

           o   Unable to bind to columns to statement handle.

           o   Unable to fetch row from statement handle.

           Side Effects: NONE.

           Notes: NONE.

   Private Functions
NOTES
       NONE.

AUTHOR
       David Wheeler <david@justatheory.com>

SEE ALSO
       Bric, Bric::Util::Grp, Bric::Util::Grp::Person,
       Bric::Util::Grp::Parts::Member



perl v5.12.2                      2Bric::Util::Grp::Parts::Member::Contrib(3p)
