Skip to content

Commit eced730

Browse files
authored
Add IO pub. status update via REST API. (#1624) (#1626)
Added functionality to the information object update REST API endpoint to allow an information object's publication status to be changed.
1 parent d273dae commit eced730

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

plugins/arRestApiPlugin/modules/api/actions/informationobjectsUpdateAction.class.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,16 @@ protected function processField($field, $value)
239239
$this->io->levelOfDescriptionId = $term->id;
240240
}
241241

242+
break;
243+
244+
case 'published':
245+
$publicationStatus = 'Draft';
246+
if ($value) {
247+
$publicationStatus = 'Published';
248+
}
249+
250+
$this->io->setPublicationStatusByName($publicationStatus);
251+
242252
break;
243253
}
244254
}

0 commit comments

Comments
 (0)