Print a color job in B&W  | 
|---|
// script entry pointfunction main(){// If the job is color, show a Yes/No dialog to ask if they want to print the job in B&W. if ($this->job->color){ $this->dialogYesNo("Jobs sent to this queue are printed in B&W, do you still want to send the job here?"); }}// If Yes clicked, the user is informed that the job was sent to the B&W queue via a MDC notification.function onYes(){ $this->job->owner->sendNotification("info","Job successfully sent","Your job was sent to the B&W queue.");}// If No clicked, the job is deleted and the user is informed about it via a MDC notification.function onNo(){ $this->job->delete(); $this->job->owner->sendNotification("info","Job deleted","Your job was deleted.");} | 
Move job to a personal queue  | 
|---|
// script entry pointfunction main() { /** Job object */ $job = $this->job;  // Get the personal queues and create a list $queues = $job->owner->getPersonalQueues(); $queueList = []; foreach ($queues as $queue) { $queueList[$queue->name] = $queue->name;    }  $list = $this->singleSelectList('Personal queues', $queueList);  $this->dialog('Select a queue', [ $list, $this->buttonPrint(), $this->buttonCancel()    ]);} // If print clickedfunction onPrint($inputs) { $queue = $this->getField('Personal queues'); $this->job->moveToQueue($queue);} // If cancel clickedfunction onCancel() { // nothing. Job will be released.} |