Skip to content

Commit

Permalink
Deprecated webform_address_loqate for removal in v3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
baikho committed May 27, 2020
1 parent 5bfc1bd commit c82dff1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
3 changes: 3 additions & 0 deletions modules/pca_webform/src/Element/WebformAddressLoqate.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
* Provides a Webform element for an address element.
*
* @FormElement("webform_address_loqate")
*
* @deprecated in Loqate 2.1.0 and will be removed in Loqate 3.0.0. Use
* \Drupal\loqate\Element\PcaAddress instead.
*/
class WebformAddressLoqate extends WebformCompositeBase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
*/
class LoqatePcaAddress extends WebformCompositeBase {

/**
* {@inheritdoc}
*/
public function getPluginLabel() {
return \Drupal::moduleHandler()->moduleExists('pca_address') ? $this->t('Basic PCA address') : parent::getPluginLabel();
}

/**
* {@inheritdoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,24 @@
*
* @WebformElement(
* id = "webform_address_loqate",
* label = @Translation("PCA address"),
* label = @Translation("PCA address (deprecated)"),
* description = @Translation("Loqate API provides a form element to collect address information (street, city, state, zip)."),
* category = @Translation("Composite elements"),
* multiline = TRUE,
* composite = TRUE,
* states_wrapper = TRUE,
* )
*
* @deprecated in Loqate 2.1.0 and will be removed in Loqate 3.0.0. Use
* \Drupal\pca_webform\Plugin\WebformElement\LoqatePcaAddress instead.
*/
class WebformAddressLoqate extends WebformCompositeBase {

/**
* {@inheritdoc}
*/
public function getPluginLabel() {
return \Drupal::moduleHandler()->moduleExists('pca_address') ? $this->t('Basic PCA address') : parent::getPluginLabel();
return \Drupal::moduleHandler()->moduleExists('pca_address') ? $this->t('Basic PCA address (deprecated)') : parent::getPluginLabel();
}

/**
Expand Down

0 comments on commit c82dff1

Please sign in to comment.