Open Source Content Management System

Group Object Definition

This section describes the structure of Midgard's group objects as returned by mgd_get_group. Midgard's list functions (such as mgd_list_groups) return Fetchables only, no real MidgardGroup objects.

Most object members map directly to the record fields described before. Some of them are read-only and can only be changed using a special function (see below), others are derived from one or more record fields and only provided for your convenience (homepagelink, emaillink, address).

The functions listed within the object definition are the object methods that are available for the object. Usage information about those methods and common information about Midgard objects can be found in the Objects and Methods chapter.

// MidgardGroup: Object Prototype for full instances  

class MidgardGroup {  

  // Basic record data (read/write)  
  var $id;  
  var $name;  
  var $official;  
  var $street;  
  var $postcode;  
  var $city;  
  var $homepage;  
  var $email;  
  var $extra;  
  var $owner;  

  // Derived fields for convenience (read-only)  
  var $homepagelink;        // Anchor tag to the $homepage  
  var $emaillink;           // Anchor tag to mailto:$email  
  var $address;             // "$street, $postcode $city"  

  var $sitegroup;  


  // Public methods  

  function create();  
  function update();  
  function delete();  

  function createattachment();  
  function updateattachment();  
  function deleteattachment();  
  function getattachment();  
  function listattachment();  
  function openattachment();  
  function serveattachment();  

  function parameter();  
  function listparameters();  
  function searchparameters();  

  function setsitegroup();  
  function getsitegroup();  

}

Note: group's owner attribute refers to another group, not a person

Designed by Nemein, hosted by Anykey