concrete/src/Page/Page.php
public function setPageType(\Concrete\Core\Page\Type\Type $type = null)
    {
        $ptID = 0;
        if (is_object($type)) {
            $ptID = $type->getPageTypeID();
        }
        $db = Database::connection();
        $db->executeQuery('update Pages set ptID = ? where cID = ?', [$ptID, $this->cID]);
        $this->ptID = $ptID;
    }
public function setPageType(\Concrete\Core\Page\Type\Type $type = null)
    {
        $ptID = 0;
        if (is_object($type)) {
            $ptID = $type->getPageTypeID();
        }
        $db = Database::connection();
        $db->executeQuery('update Pages set ptID = ? where cID = ?', [$ptID, $this->cID]);
        $this->ptID = $ptID;
    }
public function setPageType ( \ Concrete \ Core \ Page \ Type \ Type $ type = null ) { $ ptID = 0 ; if ( is_object ( $ type ) ) { $ ptID = $ type -> getPageTypeID ( ) ; } $ db = Database :: connection ( ) ; $ db -> executeQuery ( 'update Pages set ptID = ? where cID = ?' , [ $ ptID , $ this -> cID ] ) ; $ this -> ptID = $ ptID ; }
Set the theme for a page using the page object.

@param \Concrete\Core\Page\Type\Type|null $type
Set the theme for a page using the page object .