include/SugarFields/Parsers/Rules/AddressRule.php
\AddressRule
Package:
BaseRule.php
This is a utility base class to provide further refinement when converting pre 5.x files to the new meta-data rules.
- Parent(s)
- \BaseRule
- Author
- Collin Lee
Methods
getMatch(
$mixed, $regExp
)
:
void
inherited
Inherited from:
\BaseRule::getMatch()
Parameters
Name | Type | Description |
---|---|---|
$mixed | ||
$regExp |
hasAddressFieldsIntact(
\$addressPanel $addressPanel, \$suffix $suffix
)
:
boolean
hasAddressFieldsIntact This function checks to see if the address fields for the given street key is intact. This means that all five fields (street, city, state, country and postalcode) have not been moved from the address panel
Parameters
Returns
Name | Type | Description |
---|---|---|
$addressPanel | \$addressPanel | Array of address panel contents |
$suffix | \$suffix | The address suffix (billing, shipping, primary, alternate) to check for |
Type | Description |
---|---|
boolean |
isCustomField(
$mixed
)
:
void
inherited
Inherited from:
\BaseRule::isCustomField()
Parameters
Name | Type | Description |
---|---|---|
$mixed |
matches(
$mixed, $regExp
)
:
void
inherited
Inherited from:
\BaseRule::matches()
Parameters
Name | Type | Description |
---|---|---|
$mixed | ||
$regExp |
postParse(
$panels, $view
)
:
void
inherited
Inherited from:
\BaseRule::postParse()
Parameters
Name | Type | Description |
---|---|---|
$panels | ||
$view |
preParse(
$panels, $view
)
:
void
inherited
Inherited from:
\BaseRule::preParse()
Parameters
Name | Type | Description |
---|---|---|
$panels | ||
$view |
removeStreetFieldOverride(
\$panels $panels, \$street $street
)
:
void
removeStreetFieldOverride This function scans the panels and locates the street address field for the given key and replaces the Array definition (from the merging process) with a String value.
Parameters
Details
Name | Type | Description |
---|---|---|
$panels | \$panels | Array of the view's panels |
$street | \$street | String key value of the street to search for |
- Returns
- $panels Array of view's panels with street value substituted