Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
asset_status_editing_approved.inc
1 <?php
17 require_once SQ_INCLUDE_PATH.'/asset_status/asset_status_approved.inc';
18 
34 {
35 
36 
43  {
44  $this->Asset_Status_Approved($owner);
45  $this->status_tag = SQ_STATUS_EDITING_APPROVED;
46 
47  }//end constructor
48 
49 
57  public static function getDescription()
58  {
59  return translate('status_editing_approved');
60 
61  }//end getDescription()
62 
63 
71  function getAvailableStatii()
72  {
73  $return_statii = Array();
74  $statii = parent::getAvailableStatii();
75 
76  // change some of the status codes to relect that we are safe editing
77  foreach ($statii as $code => $name) {
78  if ($code == SQ_STATUS_UNDER_CONSTRUCTION) {
79  $return_statii[SQ_STATUS_EDITING] = $name;
80  } else {
81  $return_statii[$code] = $name;
82  }
83  }
84 
85  return $return_statii;
86 
87  }//end getAvailableStatii()
88 
89 
100  function processStatusChange($new_status, $update_parent=true)
101  {
102  if (!parent::processStatusChange($new_status, $update_parent)) {
103  return false;
104  }
105 
106  if ($new_status == SQ_STATUS_LIVE) {
107  // safe edit is finished, so we dont need the system version any more
108  if (!$this->owner->clearSystemVersion()) return false;
109  }
110  return true;
111 
112  }//end processStatusChange()
113 
114 
115 }//end class
116 
117 ?>