本文整理汇总了PHP中FileUpload::moveFile方法的典型用法代码示例。如果您正苦于以下问题:PHP FileUpload::moveFile方法的具体用法?PHP FileUpload::moveFile怎么用?PHP FileUpload::moveFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileUpload
的用法示例。
在下文中一共展示了FileUpload::moveFile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeRestartWorkflow
//.........这里部分代码省略.........
$items = $field['items'];
foreach($items as $item) {
$newField = new WorkflowSlotFieldRadiogroup();
$newField->setWorkflowslotfieldId($fieldId);
$newField->setFieldradiogroupId($item['fieldradiogroup_id']);
$newField->setValue($item['value']);
$newField->setPosition($item['position']);
$newField->save();
}
break;
case 'CHECKBOXGROUP':
$items = $field['items'];
foreach($items as $item) {
$newField = new WorkflowSlotFieldCheckboxgroup();
$newField->setWorkflowslotfieldId($fieldId);
$newField->setFieldcheckboxgroupId($item['fieldradiogroup_id']);
$newField->setValue($item['value']);
$newField->setPosition($item['position']);
$newField->save();
}
break;
case 'COMBOBOX':
$items = $field['items'];
foreach($items as $item) {
$newField = new WorkflowSlotFieldCombobox();
$newField->setWorkflowslotfieldId($fieldId);
$newField->setFieldcomboboxId($item['fieldradiogroup_id']);
$newField->setValue($item['value']);
$newField->setPosition($item['position']);
$newField->save();
}
break;
case 'FILE':
$moveFile = new FileUpload();
$moveFile->moveFile($field['items'][0], $newVersionId,$workflowtemplate_id[0]['workflowtemplate_id'], $request->getParameter('versionid'));
$newField = new WorkflowSlotFieldFile();
$newField->setWorkflowslotfieldId($fieldId);
$newField->setFilename($field['items'][0]['filename']);
$newField->setHashname($field['items'][0]['hashname']);
$newField->save();
break;
}
}
// save the users for a slot
$userCounter = 0;
foreach($users as $user) {
$wfSlotUser = new WorkflowSlotUser();
$wfSlotUser->setWorkflowslotId($slotId);
$wfSlotUser->setPosition($user['position']);
$wfSlotUser->setUserId($user['user_id']);
$wfSlotUser->save();
// store the new id of the user and its user_id
$dataStore[$slotCounter]['slotuser_id'][$userCounter]['id'] = $wfSlotUser->getId();
$dataStore[$slotCounter]['slotuser_id'][$userCounter++]['user_id'] = $user['user_id'];
}
$slotCounter++;
}
/**
* save files from file grid in overview.
* files are moved forom ext
* $keys[0]['uploadfile']->file1