src/Data/DefaultDataProvider.php
public function getActiveVersion($mixID)
    {
        $queryBuilder = $this->connection->createQueryBuilder();
        $queryBuilder->select(['select']);
        $queryBuilder->from('tl_version');
        $queryBuilder->andWhere($queryBuilder->expr()->eq('tl_version.pid', ':pid'));
        $queryBuilder->setParameter(':pid', $mixID);
        $queryBuilder->andWhere($queryBuilder->expr()->eq('tl_version.fromTable', ':fromTable'));
        $queryBuilder->setParameter(':fromTable', $this->source);
        $queryBuilder->andWhere($queryBuilder->expr()->eq('tl_version.active', ':active'));
        $queryBuilder->setParameter(':active', 1);

        $statement = $queryBuilder->execute();
        if (0 === $statement->rowCount()) {
            return null;
        }

        return $statement->fetch(\PDO::FETCH_OBJ)->version;
    }
public function getActiveVersion($mixID)
    {
        $queryBuilder = $this->connection->createQueryBuilder();
        $queryBuilder->select(['select']);
        $queryBuilder->from('tl_version');
        $queryBuilder->andWhere($queryBuilder->expr()->eq('tl_version.pid', ':pid'));
        $queryBuilder->setParameter(':pid', $mixID);
        $queryBuilder->andWhere($queryBuilder->expr()->eq('tl_version.fromTable', ':fromTable'));
        $queryBuilder->setParameter(':fromTable', $this->source);
        $queryBuilder->andWhere($queryBuilder->expr()->eq('tl_version.active', ':active'));
        $queryBuilder->setParameter(':active', 1);

        $statement = $queryBuilder->execute();
        if (0 === $statement->rowCount()) {
            return null;
        }

        return $statement->fetch(\PDO::FETCH_OBJ)->version;
    }
public function getActiveVersion ( $ mixID ) { $ queryBuilder = $ this -> connection -> createQueryBuilder ( ) ; $ queryBuilder -> select ( [ 'select' ] ) ; $ queryBuilder -> from ( 'tl_version' ) ; $ queryBuilder -> andWhere ( $ queryBuilder -> expr ( ) -> eq ( 'tl_version.pid' , ':pid' ) ) ; $ queryBuilder -> setParameter ( ':pid' , $ mixID ) ; $ queryBuilder -> andWhere ( $ queryBuilder -> expr ( ) -> eq ( 'tl_version.fromTable' , ':fromTable' ) ) ; $ queryBuilder -> setParameter ( ':fromTable' , $ this -> source ) ; $ queryBuilder -> andWhere ( $ queryBuilder -> expr ( ) -> eq ( 'tl_version.active' , ':active' ) ) ; $ queryBuilder -> setParameter ( ':active' , 1 ) ; $ statement = $ queryBuilder -> execute ( ) ; if ( 0 === $ statement -> rowCount ( ) ) { return null ; } return $ statement -> fetch ( \ PDO :: FETCH_OBJ ) -> version ; }
Retrieve the current active version for a row.

@param mixed $mixID The ID of the row.

@return mixed The current version number of the requested row.
Retrieve the current active version for a row .