public function EntityLegalDocument::getAcceptanceDeliveryMethod in Entity Legal 4.0.x
Same name and namespace in other branches
- 8.2 src/Entity/EntityLegalDocument.php \Drupal\entity_legal\Entity\EntityLegalDocument::getAcceptanceDeliveryMethod()
- 3.0.x src/Entity/EntityLegalDocument.php \Drupal\entity_legal\Entity\EntityLegalDocument::getAcceptanceDeliveryMethod()
Get the acceptance delivery method for a given user type.
Parameters
bool $new_user: Get the method for new signups or existing accounts.
Return value
string The acceptance delivery method.
Overrides EntityLegalDocumentInterface::getAcceptanceDeliveryMethod
File
- src/
Entity/ EntityLegalDocument.php, line 287
Class
- EntityLegalDocument
- Defines the entity legal document entity.
Namespace
Drupal\entity_legal\EntityCode
public function getAcceptanceDeliveryMethod($new_user = FALSE) {
$setting_group = $new_user ? 'new_users' : 'existing_users';
return isset($this
->get('settings')[$setting_group]['require_method']) ? $this
->get('settings')[$setting_group]['require_method'] : FALSE;
}