Overview

Packages

  • Eabi
    • Dpd
  • None
  • PHP

Classes

  • dpdcodpayment
  • eabi_dpd_courier
  • Eabi_dpd_courierCourierModuleFrontController
  • eabi_dpd_parcelstore
  • eabi_dpd_parcelstore_data_send_executor
  • eabi_dpd_parcelstore_dpd_api
  • eabi_dpd_parcelstore_dpd_helper
  • eabi_dpd_parcelstore_html_helper
  • eabi_dpd_parcelstore_validator_helper
  • Eabi_dpd_parcelstoreCourierModuleFrontController
  • Eabi_Postoffice
  • eabi_postoffice_dialcode_helper
  • Eabi_PostofficePostofficeModuleFrontController

Functions

  • upgrade_module_0_3
  • upgrade_module_0_6
  • upgrade_module_0_8
  • Overview
  • Package
  • Class
  • Tree

Class eabi_dpd_parcelstore_html_helper

Allows to create label and input combinations by <span class="php-var">$_html_template</span> where each get*Html function creates exactly one input row.

each get*Html function takes following arguments:

  • <span class="php-var">$fieldName</span> - name attribute for designated input element
  • <span class="php-var">$fieldData</span> - assoc array containing data how to build the input element
  • <span class="php-var">$value</span> - if this field needs to set a value, then supply it here. Multiselects accept comma separated string values

<span class="php-var">$fieldData</span> is in following format:

  • 'title' =&gt; label attribute for the form element,
    'type' =&gt; text,textarea,select,multiselect,password are allowed field types.
    'description' =&gt; if this field is filled, then it is displayed next to input,
    'default' =&gt; default value for the current field,
    'css' =&gt; form field elements style attribute,
    'validate-if' =&gt; validation can be invoked based on conditions defined in assoc array('form-field-name' => 'expected-value', 'another-form-field-name' => 'another-value'), which are processed as <b>validate-if-any</b> is true.
    'validate' =&gt; array of validation routine names,
    'options' =&gt; assoc array of select,multiselect options,
    
    

When using methods, where smarty is required, then context and module instance need to be set.

Author: Matis
Located at eabi_dpd_parcelstore/html_helper.php
Methods summary
public
# __construct( )
public eabi_dpd_parcelstore_html_helper
# setModuleInstance( ModuleCore $moduleInstance )

When you need to use smarty, then you need to supply the current module as parameter

When you need to use smarty, then you need to supply the current module as parameter

Parameters

$moduleInstance
ModuleCore
$moduleInstance

Returns

eabi_dpd_parcelstore_html_helper
public eabi_dpd_parcelstore_html_helper
# setContext( ContextCore $context )

Current modules context object, when needing to fetch templates from right directory.

Current modules context object, when needing to fetch templates from right directory.

Parameters

$context
ContextCore
$context

Returns

eabi_dpd_parcelstore_html_helper
public string
# getTextHtml( string $fieldName, array $fieldData, mixed $value = false )

Gets Text Html

Gets Text Html

Parameters

$fieldName
string
$fieldName HTML name attribute for the input field
$fieldData
array
$fieldData information how to build the form element
$value
mixed
$value supplied form field value

Returns

string
resulting field html

See

eabi_dpd_parcelstore_html_helper
public string
# getPasswordHtml( string $fieldName, array $fieldData, mixed $value = false )

Gets input[type=password] HTML element

Gets input[type=password] HTML element

Parameters

$fieldName
string
$fieldName HTML name attribute for the input field
$fieldData
array
$fieldData information how to build the form element
$value
mixed
$value supplied form field value

Returns

string
resulting field html

See

eabi_dpd_parcelstore_html_helper
public string
# getTextareaHtml( string $fieldName, array $fieldData, mixed $value = false )

Returns textarea form element HTML

Returns textarea form element HTML

Parameters

$fieldName
string
$fieldName HTML name attribute for the input field
$fieldData
array
$fieldData information how to build the form element
$value
mixed
$value supplied form field value

Returns

string
resulting field html

See

eabi_dpd_parcelstore_html_helper
public string
# getSelectHtml( string $fieldName, array $fieldData, mixed $value = false )

Returns select form element HTML

Returns select form element HTML

Parameters

$fieldName
string
$fieldName HTML name attribute for the input field
$fieldData
array
$fieldData information how to build the form element
$value
mixed
$value supplied form field value

Returns

string
resulting field html

See

eabi_dpd_parcelstore_html_helper
protected
# _getGlobalValueCheckbox( mixed $fieldName, mixed $fieldData, mixed $value )
public string
# getMultiselectHtml( string $fieldName, array $fieldData, mixed $value = false )

Returns select[multiple=multiple] form element HTML

Returns select[multiple=multiple] form element HTML

Parameters

$fieldName
string
$fieldName HTML name attribute for the input field
$fieldData
array
$fieldData information how to build the form element
$value
mixed
$value supplied form field value

Returns

string
resulting field html

See

eabi_dpd_parcelstore_html_helper
public
# getStoresHtml( mixed $fieldName, mixed $fieldData, mixed $value = false )
protected array
# _getStoreScopes( mixed $selected = false )

Returns

array
protected string
# _addUrlGetParams( string $url, array $params )

Adds GET parameters to end of current URL

Adds GET parameters to end of current URL

Parameters

$url
string
$url
$params
array
$params

Returns

string
public string
# getCountrypriceHtml( string $fieldName, array $fieldData, mixed $value = false )

Returns template, which renders price depeding on country form element HTML

includes template file: views/templates/hook/countryprice.tpl

includes javascript file: js/eabi_dpd_parcelstore.js

includes javascript file: js/plugins/jquery.loadTemplate.js

Returns template, which renders price depeding on country form element HTML

includes template file: views/templates/hook/countryprice.tpl

includes javascript file: js/eabi_dpd_parcelstore.js

includes javascript file: js/plugins/jquery.loadTemplate.js

Parameters

$fieldName
string
$fieldName HTML name attribute for the input field
$fieldData
array
$fieldData information how to build the form element
$value
mixed
$value supplied form field value

Returns

string
resulting field html

See

eabi_dpd_parcelstore_html_helper
public string
# getMultilangHtml( string $fieldName, array $fieldData, mixed $value = false )

Renders input[type=text] for default setting and then additional per language.

Values are posted back as assoc array, where array key is id_language and string '0' for default setting

Renders input[type=text] for default setting and then additional per language.

Values are posted back as assoc array, where array key is id_language and string '0' for default setting

Parameters

$fieldName
string
$fieldName HTML name attribute for the input field
$fieldData
array
$fieldData information how to build the form element
$value
mixed
$value supplied form field value

Returns

string
resulting field html

See

eabi_dpd_parcelstore_html_helper
public string
# getMultilangTextareaHtml( string $fieldName, array $fieldData, mixed $value = false )

Renders input[type=text] for default setting and then additional per language.

Values are posted back as assoc array, where array key is id_language and string '0' for default setting

Renders input[type=text] for default setting and then additional per language.

Values are posted back as assoc array, where array key is id_language and string '0' for default setting

Parameters

$fieldName
string
$fieldName HTML name attribute for the input field
$fieldData
array
$fieldData information how to build the form element
$value
mixed
$value supplied form field value

Returns

string
resulting field html

See

eabi_dpd_parcelstore_html_helper
public Eabi_Postoffice
# _getHelperModule( )

Returns

Eabi_Postoffice
Properties summary
protected static Eabi_Postoffice $_helperModuleInstance
#
protected string $_html_template '<tr width="130" style="min-height: 35px;"> <td class="label">${LABEL}</td> <td class="value">${INPUT}</td> </tr>'
#

Default HTML template, where ${LABEL} will be replaced with desired form element label and ${INPUT} will be replaced with desired input element.

Default HTML template, where ${LABEL} will be replaced with desired form element label and ${INPUT} will be replaced with desired input element.

protected ContextCore $_context
#
protected ModuleCore $_moduleInstance
#
API documentation generated by ApiGen 2.8.0