17 require_once SQ_INCLUDE_PATH.
'/asset_status/asset_status.inc';
49 assert_is_a($owner,
'Workflow_Bundle');
51 $this->status_tag = SQ_STATUS_APPROVED;
65 return translate(
'core_workflow_bundle_approved');
79 $available_statuses = Array();
83 $available_statuses[SQ_STATUS_UNDER_CONSTRUCTION] = translate(
'status_change_reject_changes');
84 $available_statuses[SQ_STATUS_LIVE] = translate(
'status_change_make_live');
87 return $available_statuses;
104 if (!parent::processStatusChange($new_status, $update_parent)) {
108 if ($new_status == SQ_STATUS_LIVE) {
110 $wfm = $GLOBALS[
'SQ_SYSTEM']->getWorkflowManager();
111 if (!$wfm->notifyOnLive($this->owner->id, $this->status_tag)) {
116 if (!$this->owner->setDate(
'published', time())) {
135 if (array_key_exists(
'bundled_asset_admin', $this->_tmp) === FALSE) {
136 $this->_tmp[
'bundled_asset_links'] = FALSE;
137 $bundled_asset_links = $GLOBALS[
'SQ_SYSTEM']->am->getLinks($this->owner->id, SQ_LINK_NOTICE);
139 foreach ($bundled_asset_links as $linkid => $bundled_asset_link) {
140 $asset = $GLOBALS[
'SQ_SYSTEM']->am->getAsset($bundled_asset_link[
'minorid']);
141 if ($asset->adminAccess() === TRUE) {
142 $this->_tmp[
'bundled_asset_links'] = TRUE;
145 $GLOBALS[
'SQ_SYSTEM']->am->forgetAsset($asset);
151 return $this->_tmp[
'bundled_asset_links'];