Airship\Cabin\Bridge\Blueprint\Author::getPhotoData PHP Method

getPhotoData() public method

1. Get the directories for each cabin. 2. Get all of the file IDs for these directories. Our SQL query should automatically draw in the "context" parameter.
public getPhotoData ( integer $authorID, string $context ) : array
$authorID integer
$context string
return array
    public function getPhotoData(int $authorID, string $context) : array
    {
        $file = $this->db->row("SELECT\n                 f.fileid,\n                 f.filename,\n                 a.slug\n             FROM\n                 hull_blog_author_photos p\n             JOIN\n                 hull_blog_authors a\n                 ON p.author = a.authorid\n             JOIN\n                 hull_blog_photo_contexts c\n                 ON p.context = c.contextid\n             JOIN\n                 airship_files f\n                 ON p.file = f.fileid\n             WHERE\n                 c.label = ? AND a.authorid = ?\n             ", $context, $authorID);
        if (empty($file)) {
            return [];
        }
        return $file;
    }