mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 05:44:24 +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;
|
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