You are here

protected static function AddressStreetAsTextArea::addressElements in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 5.0.x modules/salesforce_address/src/Element/AddressStreetAsTextArea.php \Drupal\salesforce_address\Element\AddressStreetAsTextArea::addressElements()

Builds the format-specific address elements.

Parameters

array $element: The existing form element array.

array $value: The address value, in $property_name => $value format.

Return value

array The modified form element array containing the format specific elements.

Overrides Address::addressElements

File

modules/salesforce_address/src/Element/AddressStreetAsTextArea.php, line 20

Class

AddressStreetAsTextArea
Replaces the address line(s) on an address form element with a textarea.

Namespace

Drupal\salesforce_address\Element

Code

protected static function addressElements(array $element, array $value) {
  $element = Address::addressElements($element, $value);
  $element["address_line1"]["#type"] = "textarea";
  $element["address_line1"]["#rows"] = "2";
  $element["address_line2"]["#access"] = FALSE;
  return $element;
}