API: Adding a page in unapproved mode
Permalink
Hey All,
I'm trying to write some code to add a page in the unapproved state. So, I'm working at it in this way:
So yeah, not sure what to call from here to put it into an unapproved state. Maybe:
$p->loadVersionObject('')
but I'm just not getting it. Thanks for any help
I'm trying to write some code to add a page in the unapproved state. So, I'm working at it in this way:
$parent = Page::getByID($parent_id); $ct =CollectionType::getByID($collection_type); $data = array('cName' => 'Page Name', 'cDescription' => 'Page Desc, here', 'cDatePublic' => $date); $p = $parent->add($ct, $data); //do something with $p here to make it unapproved
So yeah, not sure what to call from here to put it into an unapproved state. Maybe:
$p->loadVersionObject('')
but I'm just not getting it. Thanks for any help
mb