ArticleGalleyDAO::getByContextId PHP Method

getByContextId() public method

Retrieve all galleys of a journal.
public getByContextId ( $journalId ) : DAOResultFactory
$journalId int
return DAOResultFactory
    function getByContextId($journalId)
    {
        $result = $this->retrieve('SELECT	sf.*, g.*
			FROM	submission_galleys g
				INNER JOIN submissions a ON (g.submission_id = a.submission_id)
				LEFT JOIN submission_files sf ON (g.file_id = sf.file_id)
				LEFT JOIN submission_files nsf ON (nsf.file_id = g.file_id AND nsf.revision > sf.revision)
			WHERE	a.context_id = ?
				AND nsf.file_id IS NULL', (int) $journalId);
        return new DAOResultFactory($result, $this, '_fromRow');
    }