Page List Object Unapproved Pages

Looking at the api I find that the displayUnapprovedPages() method of the page list object is deprecated. It is NOT deprecated in the legacy page list. What is the proper way of doing this moving forward, as I don’t see the proper method to use?

https://documentation.concretecms.org/api/9.1.1/Concrete/Core/Page/PageList.html#method_displayUnapprovedPages

Edit: What should I be expecting of includeInactivePages() ??

One would be led to believe $this->list->includeInactivePages() would be the replacement for $this->list->displayUnapprovedPages() which is deprecated. Im not getting any results using one method or the other. If I employ both methods I get the expected list of draft pages beneath the selected dashboard !drafts page…

I believe this solves the deprecation issue…

//$this->list->displayUnapprovedPages(); // deprecated //
// PAGE_VERSION_ACTIVE = 1, PAGE_VERSION_RECENT = 2, PAGE_VERSION_RECENT_UNAPPROVED = 3, PAGE_VERSION_SCHEDULED = 4
$this->list->setPageVersionToRetrieve(2);
1 Like