private static function fetchResult($gridId, $ignoreError = false)
    {
        $result = \Database::getInstance()
            ->prepare('SELECT * FROM tl_columnset WHERE id=? AND published=1')
            ->limit(1)
            ->execute($gridId);

        if (!$ignoreError && $result->numRows < 1) {
            throw new \InvalidArgumentException(sprintf('Could not find columnset with ID "%s"', $gridId));
        }

        return $result;
    }
private static function fetchResult($gridId, $ignoreError = false)
    {
        $result = \Database::getInstance()
            ->prepare('SELECT * FROM tl_columnset WHERE id=? AND published=1')
            ->limit(1)
            ->execute($gridId);

        if (!$ignoreError && $result->numRows < 1) {
            throw new \InvalidArgumentException(sprintf('Could not find columnset with ID "%s"', $gridId));
        }

        return $result;
    }
private static function fetchResult ( $ gridId , $ ignoreError = false ) { $ result = \ Database :: getInstance ( ) -> prepare ( 'SELECT * FROM tl_columnset WHERE id=? AND published=1' ) -> limit ( 1 ) -> execute ( $ gridId ) ; if ( ! $ ignoreError && $ result -> numRows < 1 ) { throw new \ InvalidArgumentException ( sprintf ( 'Could not find columnset with ID "%s"' , $ gridId ) ) ; } return $ result ; }
Fetch the database result.

@param int  $gridId      The grid id.
@param bool $ignoreError If true no exception is thrown. An empty grid is used instead.

@return \Database\Result
@throws \InvalidArgumentException If grid is not found.
Fetch the database result .