I am working on a Plugin that will take some parsed xml meta data that has article information and have it complete an initial Submission (unpublished) without having to go through the Submission process - similar to what is done by the QuickSubmitPlugin. However; I don’t want to have to use the Form. This would be the first step to eventually have this process done automatically via an FTP server.
Back to the issue…
I would like to instantiate a QuickSubmitPlugin or QuickSubmitForm and just pass in the relevant data needed to execute the submission; for example: section/author information/gallery file/. I am aware that the initialization of the Submission takes place within the QuickSubmitForm in the initData() function, and then gets executed with a call to execute() upon submitting the QuickSubmitForm (saveSubmit).
I tried looking into the QuickSubmitPlugin to see if there are any examples of initiating the Plugin without having to use the Form; however the test files only have Web Driver related functional tests, and not actually instantiating any new objects directly.
Below is a breakdown of what I have setup already:
/* plugins/importexport/MyPlugin */
class MyPlugin extends ImportExportPlugin {
/* register, getName, usage, etc. */
public function executeCLI($scriptName, &$args) {
/ * takes in xml file, parses the file into an associate array ($data) */
$data = {
'articleTitle' : 'some title',
'authors' : {
0 : { 'fname' : Jane, 'lname' : Doe }
1 : { 'fname' : Test, 'lname' : User }
}
'abstract' : 'lorem ipsum ... '
/*etc*/
}
// stuck here -> new QuickSubmitForm($this, $request)??
// how would $request be setup??
// is this even necessary?? alternative ways??
}
}
I am on OJS 3.3.
I’m a new developer in the OJS platform and also becoming familiar with the Laravel MVC architecture. Any guidance would be appreciated!