public function cleanupWorkspacesAfterFinalizing()
    {
        $queryBuilder = $this->getQueryBuilder();

        $constraints = [
            $queryBuilder->expr()->andX(
                $queryBuilder->expr()->eq(
                    'pid',
                    $queryBuilder->createNamedParameter(-1, \PDO::PARAM_INT)
                ),
                $queryBuilder->expr()->eq(
                    't3ver_wsid',
                    $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
                ),
                $queryBuilder->expr()->gt(
                    't3ver_id',
                    $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
                )
            ),
        ];

        $queryBuilder->delete('tt_content')
            ->where(...$constraints)
            ->execute();
    }
public function cleanupWorkspacesAfterFinalizing()
    {
        $queryBuilder = $this->getQueryBuilder();

        $constraints = [
            $queryBuilder->expr()->andX(
                $queryBuilder->expr()->eq(
                    'pid',
                    $queryBuilder->createNamedParameter(-1, \PDO::PARAM_INT)
                ),
                $queryBuilder->expr()->eq(
                    't3ver_wsid',
                    $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
                ),
                $queryBuilder->expr()->gt(
                    't3ver_id',
                    $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
                )
            ),
        ];

        $queryBuilder->delete('tt_content')
            ->where(...$constraints)
            ->execute();
    }
public function cleanupWorkspacesAfterFinalizing ( ) { $ queryBuilder = $ this -> getQueryBuilder ( ) ; $ constraints = [ $ queryBuilder -> expr ( ) -> andX ( $ queryBuilder -> expr ( ) -> eq ( 'pid' , $ queryBuilder -> createNamedParameter ( - 1 , \ PDO :: PARAM_INT ) ) , $ queryBuilder -> expr ( ) -> eq ( 't3ver_wsid' , $ queryBuilder -> createNamedParameter ( 0 , \ PDO :: PARAM_INT ) ) , $ queryBuilder -> expr ( ) -> gt ( 't3ver_id' , $ queryBuilder -> createNamedParameter ( 0 , \ PDO :: PARAM_INT ) ) ) , ] ; $ queryBuilder -> delete ( 'tt_content' ) -> where ( ... $ constraints ) -> execute ( ) ; }
Function to remove any remains of versioned records after finalizing a workspace action
via 'Discard' or 'Publish' commands
Function to remove any remains of versioned records after finalizing a workspace action via Discard or Publish commands