Public Member Functions | |
| isApiQuery () | |
| Getter/setter for the ApiQuery flag. | |
| setOptionsString ($options) | |
| Converts an options string into an options array and stores it. | |
| getOptions () | |
| Returns the options array. | |
| setOptions ($options) | |
| Sets the options array. | |
| execute () | |
| Evaluates the parameters, performs the requested API query, and sets up the result. | |
| isWriteMode () | |
| Indicates whether this module requires write mode. | |
| getAllowedParams () | |
| Returns the array of allowed parameters (parameter name) => (default value) or (parameter name) => (array with PARAM_* constants as keys) Don't call this function directly: use getFinalParams() to allow hooks to modify parameters as needed. | |
| getParamDescription () | |
| Returns an array of parameter descriptions. | |
| getDescription () | |
| Returns the description string for this module. | |
| getVersion () | |
| Returns a string that identifies the version of the class. | |
| storeSemanticData ($prefillFromExisting=true) | |
| This method will try to store the data in mOptions. | |
Static Public Member Functions | |
| static | handleAutoEdit ($optionsString=null, $prefillFromExisting= 'true') |
| Handles autoedit Ajax call from autoedit parser function and from save and continue button. | |
| static | addToArray (&$array, $key, $value, $toplevel=true) |
Protected Member Functions | |
| getExamples () | |
| Returns usage examples for this module. | |
Private Member Functions | |
| parseDataFromHTMLFrag (&$data, $html, $formID) | |
| parseDataFromQueryString (&$data, $queryString) | |
| Parses data from a query string into the $data array. | |
| reportError ($msg) | |
| Set HTTP error header and add error message to the ApiResult. | |
Private Attributes | |
| $mOptions = array() | |
| $mIsApiQuery = true | |
Definition at line 16 of file SF_AutoeditAPI.php.
| static SFAutoeditAPI::handleAutoEdit | ( | $ | optionsString = null, |
|
| $ | prefillFromExisting = 'true' | |||
| ) | [static] |
Handles autoedit Ajax call from autoedit parser function and from save and continue button.
| String | $optionsString the options/data string | |
| String | $prefillFromExisting String set to 'true' to retain existing form values (unset by save and continue) |
Definition at line 29 of file SF_AutoeditAPI.php.
| SFAutoeditAPI::isApiQuery | ( | ) |
Getter/setter for the ApiQuery flag.
If this is set, we are in an API query, else we are in an Ajax query.
| bool | $isApiQuery Optional. The new value |
Definition at line 98 of file SF_AutoeditAPI.php.
Referenced by execute(), reportError(), and storeSemanticData().
| SFAutoeditAPI::setOptionsString | ( | $ | options | ) |
Converts an options string into an options array and stores it.
| string | $options |
Definition at line 115 of file SF_AutoeditAPI.php.
References parseDataFromQueryString().
Referenced by execute().
| SFAutoeditAPI::getOptions | ( | ) |
| SFAutoeditAPI::setOptions | ( | $ | options | ) |
| SFAutoeditAPI::execute | ( | ) |
Evaluates the parameters, performs the requested API query, and sets up the result.
Definition at line 138 of file SF_AutoeditAPI.php.
References isApiQuery(), setOptionsString(), and storeSemanticData().
| SFAutoeditAPI::isWriteMode | ( | ) |
Indicates whether this module requires write mode.
Definition at line 156 of file SF_AutoeditAPI.php.
| SFAutoeditAPI::getAllowedParams | ( | ) |
Returns the array of allowed parameters (parameter name) => (default value) or (parameter name) => (array with PARAM_* constants as keys) Don't call this function directly: use getFinalParams() to allow hooks to modify parameters as needed.
Definition at line 167 of file SF_AutoeditAPI.php.
| SFAutoeditAPI::getParamDescription | ( | ) |
Returns an array of parameter descriptions.
Don't call this functon directly: use getFinalParamDescription() to allow hooks to modify descriptions as needed.
Definition at line 181 of file SF_AutoeditAPI.php.
| SFAutoeditAPI::getDescription | ( | ) |
Returns the description string for this module.
Definition at line 193 of file SF_AutoeditAPI.php.
References END, and scraper::form.
| SFAutoeditAPI::getExamples | ( | ) | [protected] |
Returns usage examples for this module.
Definition at line 209 of file SF_AutoeditAPI.php.
| SFAutoeditAPI::getVersion | ( | ) |
Returns a string that identifies the version of the class.
Includes the class name, the svn revision, timestamp, and last author.
Definition at line 222 of file SF_AutoeditAPI.php.
| SFAutoeditAPI::storeSemanticData | ( | $ | prefillFromExisting = true |
) |
This method will try to store the data in mOptions.
It will return true on success or an error message on failure. The used form and target page will be available in mOptions after execution of the method.
This method also sets HTTP response headers according to the result.
| bool | $prefillFromExisting If this is set, existing values in the page will be used to prefill the form. |
Definition at line 238 of file SF_AutoeditAPI.php.
References SFUtils::array_merge_recursive_distinct(), SFFormLinker::getDefaultFormsForPage(), isApiQuery(), parseDataFromHTMLFrag(), and reportError().
Referenced by execute().
| SFAutoeditAPI::parseDataFromHTMLFrag | ( | &$ | data, | |
| $ | html, | |||
| $ | formID | |||
| ) | [private] |
| SFAutoeditAPI::parseDataFromQueryString | ( | &$ | data, | |
| $ | queryString | |||
| ) | [private] |
Parses data from a query string into the $data array.
| Array | $data | |
| String | $queryString |
Definition at line 468 of file SF_AutoeditAPI.php.
Referenced by setOptionsString().
| static SFAutoeditAPI::addToArray | ( | &$ | array, | |
| $ | key, | |||
| $ | value, | |||
| $ | toplevel = true | |||
| ) | [static] |
Definition at line 493 of file SF_AutoeditAPI.php.
| SFAutoeditAPI::reportError | ( | $ | msg | ) | [private] |
Set HTTP error header and add error message to the ApiResult.
| String | $msg |
Definition at line 525 of file SF_AutoeditAPI.php.
References isApiQuery().
Referenced by storeSemanticData().
SFAutoeditAPI::$mOptions = array() [private] |
Definition at line 18 of file SF_AutoeditAPI.php.
SFAutoeditAPI::$mIsApiQuery = true [private] |
Definition at line 19 of file SF_AutoeditAPI.php.
1.5.6