You are here

protected static function AddressStreetAsTextArea::addressElements in Salesforce Suite 5.0.x

Same name and namespace in other branches
  1. 8.4 modules/salesforce_address/src/Element/AddressStreetAsTextArea.php \Drupal\salesforce_address\Element\AddressStreetAsTextArea::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;
}