|
| $required = true |
|
| $description |
|
| $page_set = 'Import Tools' |
|
COREPOS\Fannie\API\FannieUploadPage::basicForm |
( |
) | |
|
|
protected |
Default form automatically included with form_content()
- Returns
- An HTML string
COREPOS\Fannie\API\FannieUploadPage::basicPreview |
( |
) | |
|
|
protected |
Default preview of uploaded data
- Returns
- An HTML string
COREPOS\Fannie\API\FannieUploadPage::bodyContent |
( |
) | |
|
Use the function $this->content_function to generate the page contents.
- Returns
- An HTML string
COREPOS\Fannie\API\FannieUploadPage::csvToArray |
( |
|
$limit = 0 ) | |
|
|
protected |
COREPOS\Fannie\API\FannieUploadPage::fileToArray |
( |
|
$limit = 0 ) | |
|
|
protected |
Get two-dimensional array of file data
- Parameters
-
$limit | if specified only return $limit records |
- Returns
- An array of arrays. Each inner array represents one line of data
COREPOS\Fannie\API\FannieUploadPage::form_content |
( |
) | |
|
Any extra content before the form itself.
- Returns
- An HTML string
COREPOS\Fannie\API\FannieUploadPage::getColumnIndex |
( |
|
$name) | |
|
|
protected |
Get the numerical index that the user selected for a given column
- Parameters
-
$name | the name (as defined in $this->preview_opts) |
- Returns
- Integer index if available otherwise False
COREPOS\Fannie\API\FannieUploadPage::javascript_content |
( |
) | |
|
This function ensures column selections are unique.
COREPOS\Fannie\API\FannieUploadPage::preprocess |
( |
) | |
|
Handle pre-display tasks such as input processing
- Returns
- True if the page should be displayed
- False to stop here
Create temporary database table and load all records into the table
first pass; create table
Render page that includes ajax javascript
COREPOS\Fannie\API\FannieUploadPage::preview_content |
( |
) | |
|
Any extra content to show with the preview
- Returns
- An HTML string
COREPOS\Fannie\API\FannieUploadPage::process_file |
( |
|
$linedata) | |
|
Do something with the uploaded data
- Parameters
-
$linedata | an array of arrays (each inner area is one line of data) |
- Returns
- True on success, False on error
COREPOS\Fannie\API\FannieUploadPage::processingError |
( |
) | |
|
|
protected |
Display if there is an processing error
- Returns
- An HTML string
COREPOS\Fannie\API\FannieUploadPage::processUpload |
( |
) | |
|
|
protected |
Store uploaded file
- Returns
- True on success, False on error
COREPOS\Fannie\API\FannieUploadPage::results_content |
( |
) | |
|
What to display when the upload is done
- Returns
- An HTML string
COREPOS\Fannie\API\FannieUploadPage::split_end |
( |
) | |
|
Called after processing all split files process_file() will be called multiple times so anything that should only happen once goes here instead.
COREPOS\Fannie\API\FannieUploadPage::split_start |
( |
) | |
|
Called before processing split files process_file() will be called multiple times so anything that should only happen once goes here instead.
COREPOS\Fannie\API\FannieUploadPage::uploadError |
( |
) | |
|
|
protected |
Display if there is an upload error
- Returns
- An HTML string
COREPOS\Fannie\API\FannieUploadPage::xlsToArray |
( |
|
$limit) | |
|
|
protected |
COREPOS\Fannie\API\FannieUploadPage::$content_function = "form_content" |
|
protected |
Function for drawing page content. form_content, preview_content, and results content provided by default.
COREPOS\Fannie\API\FannieUploadPage::$description |
Initial value:= "
Base class for handling file uploads
"
COREPOS\Fannie\API\FannieUploadPage::$preview = true |
|
protected |
Show a preview where the user can choose columns that contain data
COREPOS\Fannie\API\FannieUploadPage::$preview_opts |
|
protected |
Initial value:= array(
'example' => array(
'name' => 'upc',
'display_name' => 'UPC',
'default' => 7,
'required' => true,
),
)
Define user-selectable options
COREPOS\Fannie\API\FannieUploadPage::$use_js = false |
|
protected |
Make repeated AJAX calls to process part of the file and provide progress feedback. Similar to splitting in that process_file is called repeatedly and split_start() and split_end() called once each at the very beginning and end. Works with all supported file types BUT must be able to load the entire file within PHP's memory_limit. Memory allocated to load the file can be substantially higher than the raw file size.
COREPOS\Fannie\API\FannieUploadPage::$use_splits = false |
|
protected |
Split uploaded file into multiple smaller files process_file() will be called separately for each smaller file. split_start() and split_end() are called at the beginning and end of the whole process. Only works with CSV files in *nix environments.
The documentation for this class was generated from the following file:
- fannie/classlib2.0/FannieUploadPage.php