mirror of
https://github.com/colymba/GridFieldBulkEditingTools.git
synced 2024-10-22 11:05:57 +02:00
29482dbd17
BulkUploadField Extends UploadField so handlers link properly through the GridField
22 lines
536 B
PHP
22 lines
536 B
PHP
<?php
|
|
/**
|
|
* Custom UploadField used to override Link()
|
|
* and redirect UploadField action properly through the GridField.
|
|
*
|
|
* @author colymba
|
|
*/
|
|
class BulkUploadField extends UploadField
|
|
{
|
|
protected $gridfield;
|
|
|
|
public function __construct($gridfield, $parent, $folderName = null) {
|
|
$this->gridfield = $gridfield;
|
|
parent::__construct($parent, $folderName);
|
|
}
|
|
|
|
public function Link($action = null)
|
|
{
|
|
return Controller::join_links($this->gridfield->Link(), 'bulkupload/', $action);
|
|
}
|
|
}
|