og_bundle_master Class Reference

Inheritance diagram for og_bundle_master:

Inheritance graph
[legend]
Collaboration diagram for og_bundle_master:

Collaboration graph
[legend]

List of all members.


Detailed Description

Definition at line 214 of file og_blueprints.module.


Public Member Functions

 __construct ()
__get ($member)
 dashboard ()
 increment_bid_version ()
 sort_for_display ()

Public Attributes

 $bid
 $group_name
 $grouptype
 $release_id
 $vid

Protected Member Functions

 load_all_blueprints ()

Protected Attributes

 $blueprints = array()

Member Function Documentation

og_bundle_master::__construct (  ) 

Reimplemented from og_bundle.

Definition at line 216 of file og_blueprints.module.

00216                          {
00217     $this->grouptype = 'master';
00218     parent::__construct();
00219     $this->load_all_blueprints();
00220     $this->sort_for_display();
00221   }

& og_bundle::__get ( member  )  [inherited]

Definition at line 73 of file og_blueprints.module.

00073                            {
00074     switch (TRUE) {
00075       case (is_numeric($member) && in_array($member, array_keys(og_blueprints_list()))):
00076         return $this->blueprints[$member];
00077 
00078       case ($member == 'blueprints'):
00079         return $this->blueprints;
00080     }
00081   }

og_bundle_master::dashboard (  ) 

Definition at line 223 of file og_blueprints.module.

00223                               {
00224     if (og_blueprints_mode() == 2) {
00225       $dashboard['version_text'] = array('#value' => t('Active Release: ') . '<strong>N/A</strong>');
00226       $dashboard['new_release'] = array('#value' => '<em>' . t("Can't release Master bundle") . '</em>');
00227     }
00228     else {
00229       $dashboard['new_release'] = array('#value' => l(t('Create new release'), "admin/og/og_blueprints/release/create/$this->grouptype"));
00230       $dashboard['version_text'] = array('#value' => t('Active Release: ') . '<strong>' . (!empty($this->release_id) ? $this->release_id : 'NONE') . '</strong>');
00231     }
00232     foreach ($dashboard as $key => $item) {
00233       $dashboard[$key] = drupal_render($item); // FIXME just do em directly above
00234     }
00235     return $dashboard;
00236   }

og_bundle::increment_bid_version (  )  [inherited]

Definition at line 67 of file og_blueprints.module.

00067                                           {
00068     db_query("INSERT INTO {og_bundle_revision} (bid) VALUES (%d)", $this->bid);
00069     db_query("UPDATE {og_bundle} SET vid = (SELECT vid FROM {og_bundle_revision} WHERE bid = %d ORDER BY vid DESC LIMIT 1) , release_id = %d WHERE bid = %d", $this->bid, $this->release_id, $this->bid);
00070     $this->vid = db_result(db_query("SELECT vid FROM {og_bundle} WHERE bid = %d", $this->bid)); // FIXME be consistent with make_release(), whichever way you go
00071   }

og_bundle::load_all_blueprints (  )  [protected, inherited]

Definition at line 55 of file og_blueprints.module.

00055                                            {
00056     $blueprint_type = preg_replace('/bundle/', 'blueprint', get_class($this));
00057     $blueprints = db_query("SELECT bpid FROM {og_blueprint} WHERE vid = %d", $this->vid);
00058     while ($blueprint = db_fetch_array($blueprints)) {
00059       $this->blueprints[$blueprint['bpid']] =& new $blueprint_type(array('bpid' => $blueprint['bpid'], 'vid' => $this->vid));
00060     }
00061   }

og_bundle::sort_for_display (  )  [inherited]

Definition at line 63 of file og_blueprints.module.

00063                                      {
00064     uasort(&$this->blueprints, 'og_blueprints_sort_bundle');
00065   }


Member Data Documentation

og_bundle::$bid [inherited]

Definition at line 41 of file og_blueprints.module.

og_bundle::$blueprints = array() [protected, inherited]

Definition at line 42 of file og_blueprints.module.

og_bundle::$group_name [inherited]

Definition at line 41 of file og_blueprints.module.

og_bundle::$grouptype [inherited]

Definition at line 41 of file og_blueprints.module.

og_bundle::$release_id [inherited]

Definition at line 41 of file og_blueprints.module.

og_bundle::$vid [inherited]

Definition at line 41 of file og_blueprints.module.


The documentation for this class was generated from the following file:

Generated on Sun May 18 20:36:51 2008 for Organic Groups Blueprints by  doxygen 1.5.5