You are here

class AddressStreetAsTextArea 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

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

Salesforce has a textarea for the Street field, this matches that in Drupal so we can sync easier.

Plugin annotation

@FormElement("address_street_as_textarea");

Hierarchy

Expanded class hierarchy of AddressStreetAsTextArea

File

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

Namespace

Drupal\salesforce_address\Element
View source
class AddressStreetAsTextArea extends Address {

  /**
   * {@inheritdoc}
   */
  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;
  }

}

Members