Created
February 9, 2019 23:30
-
-
Save ein-stein-chen/b274beaaefcf561acc3fa2fbf3efb8c6 to your computer and use it in GitHub Desktop.
Allow Monica to export tags -- not good code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @param Contact $contact | |
| * @param VCard $vcard | |
| */ | |
| private function exportTags(Contact $contact, VCard $vcard) | |
| { | |
| $vCardTag = ''; | |
| foreach ($contact->tags()->get() as $tag) { | |
| $vCardTag .= ($tag->name).","; | |
| } | |
| $vcard->add('CATEGORIES',explode(',', rtrim($vCardTag, ','))); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment