本文整理汇总了PHP中UploadField::getRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP UploadField::getRequest方法的具体用法?PHP UploadField::getRequest怎么用?PHP UploadField::getRequest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UploadField
的用法示例。
在下文中一共展示了UploadField::getRequest方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Form
/**
* Build the file selection form.
*
* @return Form
*/
public function Form()
{
// Find out the requested folder ID.
$folderID = $this->parent->getRequest()->requestVar('ParentID');
if (!isset($folderID)) {
$folder = Folder::find_or_make($this->folderName);
$folderID = $folder ? $folder->ID : 0;
}
// Construct the form
$action = new FormAction('doAttach', _t('UploadField.AttachFile', 'Attach file(s)'));
$action->addExtraClass('ss-ui-action-constructive icon-accept');
$form = new Form($this, 'Form', new FieldList($this->getListField($folderID)), new FieldList($action));
// Add a class so we can reach the form from the frontend.
$form->addExtraClass('uploadfield-form');
return $form;
}