PHPackages                             rumenx/drupal\_vcard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rumenx/drupal\_vcard

Abandoned → [drupal/vcard\_generator](/?search=drupal%2Fvcard_generator)ArchivedDrupal-module[Utility &amp; Helpers](/categories/utility)

rumenx/drupal\_vcard
====================

Drupal 11+ module to generate vCards.

v1.0.0-beta(11mo ago)07MITPHPPHP &gt;=8.3

Since Jun 10Pushed 11mo agoCompare

[ Source](https://github.com/RumenDamyanov/drupal_vcard_generator)[ Packagist](https://packagist.org/packages/rumenx/drupal_vcard)[ RSS](/packages/rumenx-drupal-vcard/feed)WikiDiscussions drupal Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (3)Used By (0)

Drupal vCard Generator
======================

[](#drupal-vcard-generator)

[![CI](https://github.com/RumenDamyanov/drupal_vcard_generator/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/RumenDamyanov/drupal_vcard_generator/actions/workflows/ci.yml)[![codecov](https://camo.githubusercontent.com/0a9a40fd83835cd5ad2be25f3170d511d38278f8f99aa98cc874bb1c5de9790a/68747470733a2f2f636f6465636f762e696f2f67682f52756d656e44616d79616e6f762f64727570616c5f76636172645f67656e657261746f722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/RumenDamyanov/drupal_vcard_generator)

Features
--------

[](#features)

- Provides a service for generating vCards in Drupal.
- 100% PHPUnit unit test coverage.
- Composer-managed dependencies.

Installation
------------

[](#installation)

### Drupal.org Installation (Recommended)

[](#drupalorg-installation-recommended)

You can install the module from Drupal.org either manually or using Composer:

#### Option 1: Composer (Recommended)

[](#option-1-composer-recommended)

```
composer require drupal/vcard_generator
```

Enable the module in Drupal admin or via Drush:

```
drush en vcard_generator
```

#### Option 2: Manual Installation

[](#option-2-manual-installation)

1. Download from Drupal.org:
    - [https://www.drupal.org/project/vcard\_generator](https://www.drupal.org/project/vcard_generator)
    - Git: `git clone https://git.drupalcode.org/project/vcard_generator.git`
2. Copy the `vcard_generator` folder into your Drupal site's `modules/custom/` directory.
3. Enable the module: ```
    drush en vcard_generator
    ```

### Composer (Packagist)

[](#composer-packagist)

```
composer require rumenx/drupal_vcard_generator
```

Enable the module in Drupal admin or via Drush:

```
drush en drupal_vcard_generator
```

### Manual Installation (GitHub/Packagist)

[](#manual-installation-githubpackagist)

1. Download or clone this repository:

    - Download the ZIP from GitHub and extract it, or run:

        ```
        git clone https://github.com/RumenDamyanov/drupal_vcard_generator.git
        ```
2. Copy the `drupal_vcard_generator` folder into your Drupal site's `modules/custom/` directory.
3. Enable the module in Drupal admin or via Drush:

    ```
    drush en drupal_vcard_generator
    ```

### Usage Example

[](#usage-example)

```
/** @var \Drupal\drupal_vcard_generator\VCardGenerator $generator */
$generator = \Drupal::service('drupal_vcard_generator.generator');
$vcard = $generator->createVCard([
  'first_name' => 'Jon',
  'last_name' => 'Snow',
  'email' => 'jon.snow@winterfell.localhost',
]);
echo $vcard;
```

Advanced Usage Example
----------------------

[](#advanced-usage-example)

```
/** @var \Drupal\drupal_vcard_generator\VCardGenerator $generator */
$generator = \Drupal::service('drupal_vcard_generator.generator');
$vcard = $generator->createVCard([
  'first_name' => 'Thomas A.',
  'last_name' => 'Anderson',
  'email' => 'neo@thematrix.localhost',
  'phone' => '+1-800-NEO-0001',
  'address' => [
    'street' => '303 Matrix Lane',
    'city' => 'Mega City',
    'state' => 'Zion',
    'zip' => '10101',
    'country' => 'Simulated Reality',
  ],
  'organization' => 'Resistance',
  'department' => 'The One',
  'title' => 'The One',
  'url' => 'https://thematrix.localhost/neo',
]);
file_put_contents('neo.vcf', $vcard);
```

Supported Fields
----------------

[](#supported-fields)

- `first_name`, `last_name`: Person's name
- `email`: Email address
- `phone`: Phone number
- `address`: Array with `street`, `city`, `state`, `zip`, `country`
- `organization`: Organization name
- `department`: Department/unit (optional)
- `title`: Job title
- `url`: Website

Example Output
--------------

[](#example-output)

```
BEGIN:VCARD
VERSION:3.0
N:Anderson;Thomas A.
FN:Thomas A. Anderson
EMAIL:neo@thematrix.localhost
TEL:+1-800-NEO-0001
ADR:;;303 Matrix Lane;Mega City;Zion;10101;Simulated Reality
ORG:Resistance;The One
TITLE:The One
URL:https://thematrix.localhost/neo
END:VCARD

```

Testing
-------

[](#testing)

Run lint and unit tests with:

```
composer lint
composer test

```

Note on Namespaces and Composer Package
---------------------------------------

[](#note-on-namespaces-and-composer-package)

- **Drupal.org:**
    - Composer package: `drupal/vcard_generator`
    - Namespace: `Drupal\vcard_generator`
    - Service name: `vcard_generator.generator`
    - Info/Services YAML: `vcard_generator.info.yml`, `vcard_generator.services.yml`
- **Packagist/GitHub:**
    - Composer package: `rumenx/drupal_vcard_generator`
    - Namespace: `Drupal\drupal_vcard_generator`
    - Service name: `drupal_vcard_generator.generator`
    - Info/Services YAML: `drupal_vcard_generator.info.yml`, `drupal_vcard_generator.services.yml`

If you need to switch between the two, update the namespace in your PHP files and the `composer.json` autoload section accordingly. The codebase and service names must match the installation method.

License
-------

[](#license)

[MIT License](LICENSE.md)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance51

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

342d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48dce3e6200e787e75a4a14e0d31738d112261fe0877f15f74d3fb2c2a626229?d=identicon)[RumenX](/maintainers/RumenX)

---

Top Contributors

[![RumenDamyanov](https://avatars.githubusercontent.com/u/1458253?v=4)](https://github.com/RumenDamyanov "RumenDamyanov (6 commits)")

---

Tags

addressbookcontactsdrupaldrupal-modulephpvcard

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/rumenx-drupal-vcard/health.svg)

```
[![Health](https://phpackages.com/badges/rumenx-drupal-vcard/health.svg)](https://phpackages.com/packages/rumenx-drupal-vcard)
```

###  Alternatives

[farmos/farmos

A web-based farm record keeping application.

1.2k6.7k1](/packages/farmos-farmos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
