public function GlExchangeAdapter::getSubmission in GlobalLink Connect for Drupal 8
Same name and namespace in other branches
- 8.2 src/GlExchangeAdapter.php \Drupal\globallink\GlExchangeAdapter::getSubmission()
Get the PDSubmission object.
Parameters
\PDProject $project: The project object.
array $parameters: Array of parameters, where the expected structure is:
- name: (string) the name for this submission,
- urgent: (bool) whether or not it's an urgent job,
- comment: (string) additional notes for the job,
- due': (string) unix timestamp
Return value
\PDSubmission
File
- src/
GlExchangeAdapter.php, line 151
Class
- GlExchangeAdapter
- Provides an interface to the provided library.
Namespace
Drupal\globallinkCode
public function getSubmission(\PDProject $project, $parameters) {
$submission = new \PDSubmission();
$submission->name = $parameters['name'];
$submission->submitter = $parameters['submitter'];
$submission->isUrgent = $parameters['urgent'];
$submission->instructions = $parameters['comment'];
$submission->dueDate = $parameters['due'];
$submission->project = $project;
return $submission;
}