How to update ElggObject access_id

Hi everyone.

I have created elgg object using the following code.

$news = new ElggObject();
$news->subtype = "news";
$news->title = $page->title;
$news->description = $page->description;
$news->tags = $page->tags;
$news->owner_guid = $page->owner_guid;
$news->access_id = ACCESS_PRIVATE;

After object creation how can I update object access_id  to ACCESS_PUBLIC

Best regard


Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking