Static helper class that provides methods for dealing with imports.

Provides several generally useful methods and also includes resource management.

package Client

 Methods

Method to link up the external css or js files associated with a set of code.

add_resource(string $resource) 
InheritedStatic

This is normally called internally by the control methods to ensure the required files are linked into the page so does not need to be called directly. However it can be useful when writing custom code that uses one of these standard libraries such as jQuery. Ensures each file is only linked once.

inherited_from \helper_base::add_resource()

Parameters

$resource

string

Name of resource to link. The following options are available:

  • jquery
  • openlayers
  • graticule
  • clearLayer
  • addrowtogrid
  • indiciaMapPanel
  • indiciaMapEdit
  • georeference_google_search_api
  • google_search
  • locationFinder
  • createPersonalSites
  • autocomplete
  • indicia_locks
  • jquery_cookie
  • jquery_ui
  • jquery_ui_fr
  • jquery_form
  • json
  • reportPicker
  • treeview
  • treeview_async
  • googlemaps
  • multimap
  • virtualearth
  • google_search
  • fancybox
  • flickr
  • treeBrowser
  • defaultStylesheet
  • validation
  • plupload
  • jqplot
  • jqplot_bar
  • jqplot_pie
  • jqplot_category_axis_renderer
  • jqplot_trendline
  • reportgrid
  • tabs
  • wizardprogress
  • spatialReports
  • jsonwidget
  • timeentry
  • verification

Internal method to build a control from its options array and its template.

apply_template(string $template, array $options) 
InheritedStatic

Outputs the prefix template, a label (if in the options), a control, the control's errors and a suffix template.

inherited_from \helper_base::apply_template()

Parameters

$template

string

Name of the control template, from the global $indicia_templates variable.

$options

array

Options array containing the control replacement values for the templates. Options can contain a setting for prefixTemplate or suffixTemplate to override the standard templates.

Takes an associative array and converts it to a list of params for a query string.

array_to_query_string(array $array, boolean $encodeValues) : string
InheritedStatic

This is like http_build_query but it does not url encode the & separator, and gives control over urlencoding the array values.

inherited_from \helper_base::array_to_query_string()

Parameters

$array

array

Associative array to convert.

$encodeValues

boolean

Default false. Set to true to URL encode the values being added to the string.

Returns

stringThe query string.

Parameters forms are a quick way of specifying a simple form used to specify the input parameters for a process.

build_params_form(array $options, boolean $hasVisibleContent) 
InheritedStatic

Returns the HTML required for a parameters form, e.g. the form defined for input of report parameters or the default values for a csv import.

link used for report output, id of the report instance on the page if relevant, so that controls can be given unique ids. </li> <li><b>form</b><br/> Associative array defining the form content. </li> <li><b>readAuth</b><br/> Read authorisation array. </li> <li><b>fieldNamePrefix</b><br/> Optional prefix for form field names. </li> <li><b>defaults</b><br/> Associative array of default values for each form element. </li> <li><b>paramsToHide</b><br/> An optional array of parameter names for parameters that should be added to the form output as hidden inputs rather than visible controls. <li><b>paramsToExclude</b><br/> An optional array of parameter names for parameters that should be skipped in the form output despite being in the form definition. </li> <li><b>presetParams</b><br/> Optional array of param names and values that have a fixed value and are therefore output only as a hidden control. </li> <li><b>inlineMapTools</b><br/> Defaults to false. If true, then map drawing parameter tools are embedded into the report parameters form. If false, then the map drawing tools are added to a toolbar at the top of the map. </li> <li><b>helpText</b><br/> Defaults to true. Set to false to disable helpText being displayed alongside controls, useful for building compact versions of simple parameter forms. </li> <li><b>nocache</b><br/> Set to true to disable caching of lookups. </li> </ul>
inherited_from \helper_base::build_params_form()

Parameters

$options

array

Options array with the following possibilities:

<

ul>

  • form
    Associative array defining the form structure. The structure is the same as described for fixed_values_form in a Warehouse model.

  • $hasVisibleContent

    boolean

    On completion, this is set to true if there are visible controls in the params form. If not, then it may be appropriate to skip the displaying of this params form since it is not necessary.

    Returns a span containing any validation errors active on the form for the control with the supplied ID.

    check_errors(string $fieldname, boolean $plaintext) 
    InheritedStatic
    inherited_from \helper_base::check_errors()

    Parameters

    $fieldname

    string

    Fieldname of the control to retrieve errors for.

    $plaintext

    boolean

    Set to true to return just the error text, otherwise it is wrapped in a span.

    Returns the client helper folder path, relative to the root folder.

    client_helper_path() 
    InheritedStatic
    inherited_from \helper_base::client_helper_path()

    This method allows JavaScript and CSS links to be created and placed in the <head> of the HTML file rather than using dump_javascript which must be called after the form is built.

    dump_header(\$resources $resources) : string
    InheritedStatic

    The advantage of dump_javascript is that it intelligently builds the required links depending on what is on your form. dump_header is not intelligent because the form is not built yet, but placing links in the header leads to cleaner code which validates better.

    inherited_from \helper_base::dump_header()

    Parameters

    $resources

    \$resources

    List of resources to include in the header. The available options are described in the documentation for the add_resource method. The default for this is jquery_ui and defaultStylesheet.

    Returns

    stringText to place in the head section of the html file.

    Helper function to collect javascript code in a single location.

    dump_javascript() : string
    InheritedStatic

    Should be called at the end of each HTML page which uses the data entry helper so output all JavaScript required by previous calls.

    link http://code.google.com/p/indicia/wiki/TutorialBuildingBasicPage#Build_a_data_entry_page
    inherited_from \helper_base::dump_javascript()

    Returns

    stringJavaScript to insert into the page for all the controls added to the page so far.

    Call the enable_validation method to turn on client-side validation for any controls with validation rules defined.

    enable_validation(string $form_id) 
    InheritedStatic

    To specify validation on each control, set the control's options array to contain a 'validation' entry. This must be set to an array of validation rules in Indicia validation format. For example, 'validation' => array('required', 'email').

    inherited_from \helper_base::enable_validation()

    Parameters

    $form_id

    string

    @form_id Id of the form the validation is being attached to.

    Explodes a value on several lines into an array split on the lines.

    explode_lines(string $value) : array
    InheritedStatic

    Tolerates any line ending.

    inherited_from \helper_base::explode_lines()

    Parameters

    $value

    string

    A multi-line string to be split.

    Returns

    arrayAn array with one entry per line in $value.

    Explodes a value with key=value several lines into an array split on the lines.

    explode_lines_key_value_pairs(string $value) : array
    InheritedStatic

    Tolerates any line ending.

    inherited_from \helper_base::explode_lines_key_value_pairs()

    Parameters

    $value

    string

    A multi-line string to be split.

    Returns

    arrayAn associative array with one entry per line in $value. Array keys are the items before the = on each line, and values are the data after the = on each line.

    Internal function to find the path to the root of the site, including the trailing slash.

    getRootFolder() 
    InheritedStatic
    inherited_from \helper_base::getRootFolder()

    Retrieves a token and inserts it into a data entry form which authenticates that the form was submitted by this website.

    get_auth(string $website_id, string $password) 
    InheritedStatic
    inherited_from \helper_base::get_auth()

    Parameters

    $website_id

    string

    Indicia ID for the website.

    $password

    string

    Indicia password for the website.

    Retrieves a read token and passes it back as an array suitable to drop into the 'extraParams' options for an Ajax call.

    get_read_auth(string $website_id, string $password) 
    InheritedStatic
    inherited_from \helper_base::get_read_auth()

    Parameters

    $website_id

    string

    Indicia ID for the website.

    $password

    string

    Indicia password for the website.

    Retrieves read and write nonce tokens from the warehouse.

    get_read_write_auth(string $website_id, string $password) : \Returns
    InheritedStatic
    inherited_from \helper_base::get_read_write_auth()

    Parameters

    $website_id

    string

    Indicia ID for the website.

    $password

    string

    Indicia password for the website.

    Returns

    \Returnsan array containing: 'read' => the read authorisation array, 'write' => the write authorisation input controls to insert into your form. 'write_tokens' => the write authorisation array, if needed as separate tokens rather than just placing in form.

    List of external resources including stylesheets and js files used by the data entry helper class.

    get_resources() 
    InheritedStatic
    inherited_from \helper_base::get_resources()

    A utility function for building the inline script content which should be inserted into a page from the javaascript, late javascript and onload javascript.

    get_scripts(string $javascript, string $late_javascript, string $onload_javascript, bool $includeWrapper) 
    InheritedStatic

    Can optionally include the script tags wrapper around the script generated.

    inherited_from \helper_base::get_scripts()

    Parameters

    $javascript

    string

    JavaScript to run when the page is ready, i.e. in $(document).ready.

    $late_javascript

    string

    JavaScript to run at the end of $(document).ready.

    $onload_javascript

    string

    JavaScript to run in the window.onLoad handler which comes later in the page load process.

    $includeWrapper

    bool

    If true then includes script tags around the script.

    Utility function to load a list of terms from a termlist.

    get_termlist_terms(array $auth, mixed $termlist, array $filter) : array
    InheritedStatic
    inherited_from \helper_base::get_termlist_terms()

    Parameters

    $auth

    array

    Read authorisation array.

    $termlist

    mixed

    Either the id or external_key of the termlist to load.

    $filter

    array

    List of the terms that are required, or null for all terms.

    Returns

    arrayOutput of the Warehouse data services request for the terms.

    Calculates the folder that submitted images end up in according to the helper_config.

    get_uploaded_image_folder() 
    InheritedStatic
    inherited_from \helper_base::get_uploaded_image_folder()

    Sends a POST using the cUrl library.

    http_post(string $url, string $postargs, boolean $output_errors) : array
    InheritedStatic
    inherited_from \helper_base::http_post()

    Parameters

    $url

    string

    The URL the POST request is sent to.

    $postargs

    string

    Arguments to include in the POST data.

    $output_errors

    boolean

    Set to false to prevent echoing of errors. Defaults to true.

    Returns

    arrayAn array with a result element set to true or false for successful or failed posts respectively. The output is returned in an output element in the array. If there is an error, then an errorno element gives the cUrl error number (as generated by the cUrl library used for the post).

    Outputs an import wizard.

    importer(array $options) 
    Static

    The csv file to be imported should be available in the $_POST data, unless the existing_file option is specified. Additionally, if there are any preset values which apply to each row in the import data then you can pass these to the importer in the $_POST data. For example, you could set taxa_taxon_list:taxon_list_id=3 in the $_POST data when importing species data to force it to go into list 3.

    Parameters

    $options

    array

    Options array with the following possibilities:

    • model
      Required. The name of the model data is being imported into.
    • existing_file
      Optional. The full path on the server to an already uploaded file to import.
    • auth
      Read and write authorisation tokens.
    • presetSettings
      Optional associative array of any preset values for the import settings. Any settings which have a presetSetting specified will be ommitted from the settings form.

    Applies a output template to an array.

    mergeParamsIntoTemplate(array $params, string $template, boolean $useTemplateAsIs, boolean $allowHtml, boolean $allowEscapeQuotes) : string
    InheritedStatic

    This is used to build the output for each item in a list, such as a species checklist grid or a radio group.

    inherited_from \helper_base::mergeParamsIntoTemplate()

    Parameters

    $params

    array

    Array holding the parameters to merge into the template.

    $template

    string

    Name of the template to use, or actual template text if $useTemplateAsIs is set to true.

    $useTemplateAsIs

    boolean

    If true then the template parameter contains the actual template text, otherwise it is the name of a template in the $indicia_templates array. Default false.

    $allowHtml

    boolean

    If true then HTML is emitted as is from the parameter values inserted into the template, otherwise they are escaped.

    $allowEscapeQuotes

    boolean

    If true then parameter names can be suffixes -esape-quote, -escape-dblquote, -escape-htmlquote or -escape-htmldblquote to insert backslashes or html entities into the replacements for string escaping.

    Returns

    stringHTML for the item label

    Calculates the relative path to the client_helpers folder from wherever the current PHP script is.

    relative_client_helper_path() 
    InheritedStatic
    inherited_from \helper_base::relative_client_helper_path()

    If required, setup jQuery validation.

    setup_jquery_validation_js() 
    InheritedStatic

    This JavaScript must be added at the end of form preparation otherwise we would not know all the control messages. It will normally be called by dump_javascript automatically, but is exposed here as a public method since the iform Drupal module does not call dump_javascript, but is responsible for adding JavaScript to the page via drupal_add_js.

    inherited_from \helper_base::setup_jquery_validation_js()

    Protected function to create a cache file provided it does not already exist.

    _cacheResponse(string $file, array $response, array $options) 
    InheritedStatic
    inherited_from \helper_base::_cacheResponse()

    Parameters

    $file

    string

    Cache file to be removed, includes path - will be false if no caching to take place

    $response

    array

    http_post return value

    $options

    array

    Options array : contents used to tag what this data is.

    Protected function to generate a filename to be used as the cache file for this data

    _getCacheFileName(string $path, array $options, \number $timeout) : string
    InheritedStatic
    inherited_from \helper_base::_getCacheFileName()

    Parameters

    $path

    string

    directory path for file

    $options

    array

    Options array : contents are used along with md5 to generate the filename.

    $timeout

    \number
    • will be false if no caching to take place

    Returns

    stringfilename, else FALSE if data is not to be cached.

    Protected function to fetch a validated timeout value from passed in options array

    _getCacheTimeOut(array $options) : \Timeout
    InheritedStatic
    inherited_from \helper_base::_getCacheTimeOut()

    Parameters

    $options

    array

    Options array with the following possibilities:

    • cachetimeout
      Optional. The length in seconds before the cache times out and is refetched.

    Returns

    \Timeoutin number of seconds, else FALSE if data is not to be cached.

    Protected function to return the cached data stored in the specified local file.

    _getCachedResponse(string $file, \number $timeout, array $options) : array
    InheritedStatic
    inherited_from \helper_base::_getCachedResponse()

    Parameters

    $file

    string

    Cache file to be used, includes path

    $timeout

    \number
    • will be false if no caching to take place

    $options

    array

    Options array : contents used to confirm what this data is.

    Returns

    arrayequivalent of call to http_post, else FALSE if data is not to be cached.

    Protected function to remove a cache file if it has timed out.

    _timeOutCacheFile(string $file, \number $timeout) 
    InheritedStatic
    inherited_from \helper_base::_timeOutCacheFile()

    Parameters

    $file

    string

    Cache file to be removed, includes path

    $timeout

    \number
    • will be false if no caching to take place

    Takes a template string (e.g.

    apply_replacements_to_template(string $template, string $options) 
    InheritedStatic

    <

    div id="{id}">) and replaces the tokens with the equivalent values looked up from the $options array.

    inherited_from \helper_base::apply_replacements_to_template()

    Parameters

    $template

    string

    The templatable string.

    $options

    string

    The array of items which can be merged into the template.

    Returns a static template which is either a default template or one specified in the options

    apply_static_template(string $name, array $options) : string
    InheritedStatic
    inherited_from \helper_base::apply_static_template()

    Parameters

    $name

    string

    The static template type. e.g. prefix or suffix.

    $options

    array

    Array of options which may contain a template name.

    Returns

    stringTemplate value.

    Converts the validation rules in an options array into a string that can be used as the control class, to trigger the jQuery validation plugin.

    build_validation_class(\$options. $options) : string
    InheritedStatic
    inherited_from \helper_base::build_validation_class()

    Parameters

    $options

    \$options.

    Control options array. For validation to be applied should contain a validation entry, containing a single validation string or an array of strings.

    Returns

    stringThe validation rules formatted as a class.

    Returns templated help text for a control, but only if the position matches the $helpTextPos value, and the $options array contains a helpText entry.

    get_help_text(array $options, string $pos) : string
    InheritedStatic
    inherited_from \helper_base::get_help_text()

    Parameters

    $options

    array

    Control's options array. Can specify the class for the help text item using option helpTextClass.

    $pos

    string

    Either before or after. Defines the position that is being requested.

    Returns

    stringTemplated help text, or nothing.

    Internal implementation of the dump_javascript method which takes the javascript and resources list as flexible parameters, rather that using the globals.

    internal_dump_resources(array $resources) 
    InheritedStatic
    access private
    inherited_from \helper_base::internal_dump_resources()

    Parameters

    $resources

    array

    List of resources to include.

    Returns a string where characters have been escaped for use in jQuery selectors

    jq_esc(string $name) : string
    InheritedStatic
    inherited_from \helper_base::jq_esc()

    Parameters

    $name

    string

    The string to be escaped.

    Returns

    stringescaped name.

    Takes a file that has been uploaded to the client website upload folder, and moves it to the warehouse upload folder using the data services.

    send_file_to_warehouse(string $path, boolean $persist_auth, array $readAuth, string $service) : string
    InheritedStatic
    inherited_from \helper_base::send_file_to_warehouse()

    Parameters

    $path

    string

    Path to the file to upload, relative to the interim image path folder (normally the client_helpers/upload folder.

    $persist_auth

    boolean

    Allows the write nonce to be preserved after sending the file, useful when several files are being uploaded.

    $readAuth

    array

    readAuth Read authorisation tokens, if not supplied then the $_POST array should contain them.

    $service

    string

    Path to the service URL used. Default is data/handle_media, but could be import/upload_csv.

    Returns

    stringError message, or true if successful.

    Method to format a control error message inside a templated span.

    apply_error_template(string $error, string $fieldname) 
    InheritedStatic
    inherited_from \helper_base::apply_error_template()

    Parameters

    $error

    string

    The error message.

    $fieldname

    string

    The name of the field which the error is being attached to.

    This method is used by the mode_field_options method.

    auto_detection_rules(string $column, string $lowerCaseCaption, string $strippedScreenCaption, string $prefix, array $labelList, integer $itWasSaved, boolean $saveDetectedMode) : array
    Static

    It has two modes: When $saveDetectedMode is false, the method uses several rules in an attempt to automatically determine a value for one of the csv column drop-downs on the import page. When $saveDetectedMode is true, the method uses the same rules to see if the system would have retrieved the same drop-down value as the one that was saved by the user. If this is the case, the system acts as if the value had been automatically determined rather than saved.

    Parameters

    $column

    string

    The CSV column we are currently working with from the import file.

    $lowerCaseCaption

    string

    A version of an item in the column selection drop-down that is all lowercase.

    $strippedScreenCaption

    string

    A version of an item in the column selection drop-down that has 'lookup existing record'stripped

    $prefix

    string

    Caption prefix each item having a list of regexes to match against

    $labelList

    array

    A list of captions and the number of times they occur.

    $itWasSaved

    integer

    This is set to 1 if the system detects that the user has a custom saved preference for a csv column drop-down.

    $saveDetectedMode

    boolean

    Determines the mode the method is running in

    Returns

    arrayDepending on the mode, we either are interested in the $selected value or the $itWasSaved value.

    Takes an array of fields, and removes the website ID or survey ID fields within the arrays if the website and/or survey id are set in the $settings data.

    clear_website_survey_fields(array $array, array $settings) 
    Static

    Parameters

    $array

    array

    Array of fields.

    $settings

    array

    Global settings which apply to every row, which may include the website_id and survey_id.

    When an array (e.g.

    expand_ids_to_fks(array $arr) 
    Static

    $POST containing preset import values) has values with actual ids in it, we need to convert these to fk* so we can compare the array of preset data with other arrays of expected data.

    Parameters

    $arr

    array

    Array of IDs.

    Returns a list of columns as an list of <options> for inclusion in an HTML drop down, loading the columns from a model that are available to import data into (excluding the id and metadata).

    get_column_options(string $model, array $fields, string $column, string $selected, array $savedFieldMappings) 
    Static

    Triggers the handling of remembered checkboxes and the associated labelling. This method also attempts to automatically find a match for the columns based on a number of rules and gives the user the chance to save their settings for use the next time they do an import.

    Parameters

    $model

    string

    Name of the model

    $fields

    array

    List of the available possible import columns

    $column

    string

    The name of the column from the CSV file currently being worked on.

    $selected

    string

    The name of the initially selected field if there is one.

    $savedFieldMappings

    array

    An array containing the user's custom saved settings for the page.

    Returns a control to insert onto a parameters form.

    get_params_form_control(string $key, array $info, array $options, array $tools) : string
    InheritedStatic
    inherited_from \helper_base::get_params_form_control()

    Parameters

    $key

    string

    The unique identifier of this control.

    $info

    array

    Configuration options for the parameter as defined in the report, including the description, display (label), default and datatype.

    $options

    array

    Control options array

    $tools

    array

    Any tools to be embedded in the map toolbar are returned in this parameter rather than as the return result of the function.

    Returns

    stringThe HTML for the form parameter.

    Internal method to safely find the value of a preset parameter.

    get_preset_param(array $options, string $name) 
    InheritedStatic

    Returns empty string if not defined.

    inherited_from \helper_base::get_preset_param()

    Parameters

    $options

    array

    The options array, containing a presetParams entry that the parameter should be found in.

    $name

    string

    The key identifying the preset parameter to look for.

    Method to upload the file in the $_FILES array, or return the existing file if already uploaded.

    get_uploaded_file(array $options) 
    Static
    access private

    Parameters

    $options

    array

    Options array passed to the import control.

    Generates the import settings form.

    import_settings_form(array $options) 
    Static

    If none available, then outputs the upload mappings form.

    Parameters

    $options

    array

    Options array passed to the import control.

    Used by the get_column_options to draw the items that appear once for each of the import columns on the import page.

    items_to_draw_once_per_import_column(string $r, string $column, integer $itWasSaved, array $savedFieldMappings, integer $multiMatch) : string
    Static

    These are the checkboxes, the warning the drop-down setting was saved and also the non-unique match warning

    Parameters

    $r

    string

    The HTML to be returned.

    $column

    string

    Column from the import CSV file we are currently working with

    $itWasSaved

    integer

    This is 1 if a setting is saved for the column and the column would not have been automatically calculated as that value anyway.

    $savedFieldMappings

    array

    An array containing the user' preferences for the import page.

    $multiMatch

    integer

    Array of columns where there are multiple matches for the column and this cannot be resolved.

    Returns

    stringHTMl string

    Humanize a piece of text by inserting spaces instead of underscores, and making first letter of each word capital.

    leadingCaps(string $text) : \The
    Static

    Parameters

    $text

    string

    The text to alter.

    Returns

    \Thealtered string.

    Used by the get_column_options method to add "lookup existing record" to the appropriate captions in the drop-downs on the import page.

    make_clean_caption(\type $caption, \type $prefix, \type $fieldname, \type $model) : string
    Static

    Parameters

    $caption

    \type

    The drop-down item currently being worked on

    $prefix

    \type

    Caption prefix

    $fieldname

    \type

    The database field that the caption relates to.

    $model

    \type

    Name of the model

    Returns

    string$caption A caption for the column drop-down on the import page.

    Private method to build a single select option for the model field options.

    model_field_option(string $field, string $caption, boolean $selected, string $optionID) 
    Static

    Option is selected if selected=caption (case insensitive).

    Parameters

    $field

    string

    Name of the field being output.

    $caption

    string

    Caption of the field being output.

    $selected

    boolean

    Set to true if outputing the currently selected option.

    $optionID

    string

    Id of the current option.

    Display the page which outputs the upload progress bar.

    run_upload(array $options) 
    Static

    Adds JavaScript to the page which performs the chunked upload.

    Parameters

    $options

    array

    Array of options passed to the import control.

    Provides optional translation of field captions by looking for a translation code dd:model:fieldname.

    translate_field(string $field, string $caption) : string
    Static

    If not found returns the original caption.

    Parameters

    $field

    string

    Name of the field being output.

    $caption

    string

    Untranslated caption of the field being output.

    Returns

    stringTranslated caption.

    Returns the HTML for a simple file upload form.

    upload_form() 
    Static

    Outputs the form for mapping columns to the import fields.

    upload_mappings_form(array $options) 
    Static

    Parameters

    $options

    array

    Options array passed to the import control.

    Displays the upload result page.

    upload_result(array $options) 
    Static

    Parameters

    $options

    array

    Array of options passed to the import control.

     Properties

     

    <p>Number of recent files allowed in the cache which the cache will not bother clearing during a deletion operation. They will be refreshed occasionally when requested anyway.</p>

    $cache_allowed_file_count : integer
    Inherited
    inherited_from \helper_base::$$cache_allowed_file_count
     

    <p>On average, every 1 in $cache_chance_purge times the Warehouse is called for data, all files older than 5 times the cache_timeout will be purged, apart from the most recent $cache_allowed_file_count files.</p>

    $cache_chance_purge : integer
    Inherited
    inherited_from \helper_base::$$cache_chance_purge
     

    <p>On average, every 1 in $cache_chance_expire times the Warehouse is called for data which is cached but older than the cache timeout, the cached data will be refreshed. This introduces a random element to cache refreshes so that no single form load event is responsible for refreshing all cached content.</p>

    $cache_chance_refresh_file : integer
    Inherited
    inherited_from \helper_base::$$cache_chance_refresh_file
     

    <p>Length of time in seconds after which cached Warehouse responses will start to expire.</p>

    $cache_timeout : integer
    Inherited
    inherited_from \helper_base::$$cache_timeout
     

    <p>Path to Indicia CSS folder. If not specified, then it is calculated from the Warehouse $base_url. This path should be a full path on the server (starting with '/' exluding the domain).</p>

    $css_path : string
    Inherited
    inherited_from \helper_base::$$css_path
     

    <p>of default validation rules to apply to the controls on the form if the built in client side validation is used (with the jQuery validation plugin). This array can be replaced if required.</p>

    $default_validation_rules : Array
    Inherited
    inherited_from \helper_base::$$default_validation_rules
     

    <p>List of resources that have already been dumped out, so we don't duplicate them. For example, if the site template includes JQuery set $dumped_resources[]='jquery'.</p>

    $dumped_resources : array
    Inherited
    inherited_from \helper_base::$$dumped_resources
     

    <p>Form Mode. Initially unset indicating new input, but can be set to ERRORS or RELOAD.</p>

    $form_mode : string
    Inherited
    inherited_from \helper_base::$$form_mode
     

    <p>Helptext positioning. Determines where the information is displayed when helpText is defined for a control. Options are before, after.</p>

    $helpTextPos : string
    Inherited
    inherited_from \helper_base::$$helpTextPos
     

    <p>Path to Indicia Images folder.</p>

    $images_path : string
    Inherited
    inherited_from \helper_base::$$images_path
     

    <p>Flag set to true if returning content for an AJAX request. This allows the javascript to be returned direct rather than embedding in document.ready and window.onload handlers.</p>

    $is_ajax : boolean
    Inherited
    inherited_from \helper_base::$$is_ajax
     

    <p>JavaScript text to be emitted after the data entry form. Each control that needs custom JavaScript can append the script to this variable.</p>

    $javascript : string
    Inherited
    inherited_from \helper_base::$$javascript
     

    <p>Path to Indicia JavaScript folder. If not specified, then it is calculated from the Warehouse $base_url. This path should be a full path on the server (starting with '/' exluding the domain).</p>

    $js_path : string
    Inherited
    inherited_from \helper_base::$$js_path
     

    <p>JavaScript text to be emitted after the data entry form and all other JavaScript.</p>

    $late_javascript : string
    Inherited
    inherited_from \helper_base::$$late_javascript
     

    <p>Setting to completely disable loading from the cache</p>

    $nocache : boolean
    Inherited
    inherited_from \helper_base::$$nocache
     

    <p>JavaScript text to be emitted during window.onload.</p>

    $onload_javascript : string
    Inherited
    inherited_from \helper_base::$$onload_javascript
     

    <p>List of resources that have been identified as required by the controls used. This defines the JavaScript and stylesheets that must be added to the page. Each entry is an array containing stylesheets and javascript sub-arrays. This has public access so the Drupal module can perform Drupal specific resource output.</p>

    $required_resources : Array
    Inherited
    inherited_from \helper_base::$$required_resources
     

    <p>List of all available resources known. Each resource is named, and contains a sub array of deps (dependencies), stylesheets and javascripts.</p>

    $resource_list : Array
    Inherited
    inherited_from \helper_base::$$resource_list
     

    <p>Name of the form which has been set up for jQuery validation, if any.</p>

    $validated_form_id : array
    Inherited
    inherited_from \helper_base::$$validated_form_id
     

    <p>List of all error messages returned from an attempt to save.</p>

    $validation_errors : array
    Inherited
    inherited_from \helper_base::$$validation_errors
     

    <p>List of messages defined to pass to the validation plugin.</p>

    $validation_messages : array
    Inherited
    inherited_from \helper_base::$$validation_messages
     

    List of methods used to report a validation failure.

    $validation_mode : array
    Inherited

    Options are message, message, hint, icon, colour, inline. The inline option specifies that the message should appear on the same line as the control. Otherwise it goes on the next line, indented by the label width. Because in many cases, controls on an Indicia form occupy the full available width, it is often more appropriate to place error messages on the next line so this is the default behaviour.

    inherited_from \helper_base::$$validation_mode
     

    <p>Path to proxy script for calls to the warehouse (optional, allows the warehouse to sit behind a firewall only accessible from the server).</p>

    $warehouse_proxy : string
    Inherited
    inherited_from \helper_base::$$warehouse_proxy
     

    <p>Are we linking in the default stylesheet? Handled sligtly different to the others so it can be added to the end of the list, allowing our CSS to override other stuff.</p>

    $default_styles : Boolean
    Inherited
    inherited_from \helper_base::$$default_styles
     

    <p>List of error messages that have been displayed, so we don't duplicate them when dumping any remaining ones at the end.</p>

    $displayed_errors : array
    Inherited
    inherited_from \helper_base::$$displayed_errors
     

    Array of html attributes.

    $html_attributes 
    Inherited

    When replacing items in a template, these get automatically wrapped. E.g. a template replacement for the class will be converted to class="value". The key is the parameter name, and the value is the html attribute it will be wrapped into.

    inherited_from \helper_base::$$html_attributes
     

    <p>indicates if any form controls have specified the lockable option. If so, we will need to output some javascript.</p>

    $using_locking : Boolean
    Inherited
    inherited_from \helper_base::$$using_locking
     

    <p>Website ID, stored here to assist with caching.</p>

    $website_id : integer
    Inherited
    inherited_from \helper_base::$$website_id
     

    <p>Flag set to true if the host system is capable of storing our user's remembered import mappings for future imports.</p>

    $rememberingMappings : boolean