mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
add a method to duplicate address
This commit is contained in:
parent
4f7e350945
commit
49812d43c4
@ -141,6 +141,15 @@ class Address
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function createFromAddress(Address $original) : Address
|
||||
{
|
||||
return (new Address())
|
||||
->setPostcode($original->getPostcode())
|
||||
->setStreetAddress1($original->getStreetAddress1())
|
||||
->setStreetAddress2($original->getStreetAddress2())
|
||||
->setValidFrom($original->getValidFrom())
|
||||
;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user