public function setPageDeleted(
        PageEntity $page,
        string $modifiedByUserId,
        string $modifiedReason = Tracking::UNKNOWN_REASON
    ) {
        $pageType = $page->getPageType();

        if (strpos($pageType, self::PAGE_TYPE_DELETED) !== false) {
            return;//This page is already deleted so we don't need to do anything further
        }

        $page->setPageType(self::PAGE_TYPE_DELETED . $pageType);
        $page->setModifiedByUserId(
            $modifiedByUserId,
            $modifiedReason
        );

        $this->_em->persist($page);
        $this->_em->flush($page);
    }
public function setPageDeleted(
        PageEntity $page,
        string $modifiedByUserId,
        string $modifiedReason = Tracking::UNKNOWN_REASON
    ) {
        $pageType = $page->getPageType();

        if (strpos($pageType, self::PAGE_TYPE_DELETED) !== false) {
            return;//This page is already deleted so we don't need to do anything further
        }

        $page->setPageType(self::PAGE_TYPE_DELETED . $pageType);
        $page->setModifiedByUserId(
            $modifiedByUserId,
            $modifiedReason
        );

        $this->_em->persist($page);
        $this->_em->flush($page);
    }
public function setPageDeleted ( PageEntity $ page , string $ modifiedByUserId , string $ modifiedReason = Tracking :: UNKNOWN_REASON ) { $ pageType = $ page -> getPageType ( ) ; if ( strpos ( $ pageType , self :: PAGE_TYPE_DELETED ) !== false ) { return ; //This page is already deleted so we don't need to do anything further } $ page -> setPageType ( self :: PAGE_TYPE_DELETED . $ pageType ) ; $ page -> setModifiedByUserId ( $ modifiedByUserId , $ modifiedReason ) ; $ this -> _em -> persist ( $ page ) ; $ this -> _em -> flush ( $ page ) ; }
setPageDeleted - A way of making pages appear deleted without deleting the DB entries

@param PageEntity $page
@param string $modifiedByUserId
@param string $modifiedReason

@return bool
setPageDeleted - A way of making pages appear deleted without deleting the DB entries