I had prepared a custom plugin to display html galleys into the article details page, together with images and tables.
Using version 3.1, I could access the ‘caption’ setting of a submission by using the getData (‘caption’)
After updating to 3.3, this does not work. I know the caption is stored in ‘submission_artwork_files’, and I seem to have an idea to get the caption directly from the DB. However, my Laravel knowledge is poor (I am not a professional coder, and this is a side-project)
So how do I get the cpation or access the DB directly?
I have done so far:
-
prepared plugin (works)
-
Added:
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\LazyCollection;
use PKP\db\DAO;
$test = DB::table(‘submission_artwork_files’)
->where(‘file_id’, ‘=’, (int) $galleyFile->getData(‘id’))
->get(‘caption’);
??Order by revision DESC to get latest version
I get a Facade not set error
Thanks
ssciberras