Replacing Loader::model('file_set'); and Loader::model('file_list'); in 5.7
Permalink
All,
Working on upgeading some old blocks to the new 5.7 schema. Currently stuck on updating the FileSet code, i.e.:
Anyone know the proper syntax/method to upgrade this to 5.7? Thanks.
Working on upgeading some old blocks to the new 5.7 schema. Currently stuck on updating the FileSet code, i.e.:
Loader::model('file_list'); Loader::model('file_set'); ... $fs = FileSet::getByID($data['fsID']); ... $fileList = new FileList();
Anyone know the proper syntax/method to upgrade this to 5.7? Thanks.
I don't know if you need to do anything to load these anymore, but if you are getting errors try adding use statements to the top of your file.
Got it! I was doing the 'use' statements at the block controller level rather than the package controller level. Moving it up seemed to fix the issue. Will let you know when testing is complete/