bgallagher / bgintercom
A ZF2 module for integrating with intercom.io
dev-master
2013-02-18 22:05 UTC
Requires
- zf-commons/zfc-user: 0.*
This package is not auto-updated.
Last update: 2025-02-15 14:07:08 UTC
README
A ZF2 module to intergrate with intercom.io
##Requires:
##Instalation & Setup (using composer):
- Run
composer.phar require bgallagher/bgintercom:dev-master
. - Add
BgIntercom
to yourapplication.config.php
. - Copy the distributed config file from
vendor/bgallagher/BgIntercom/config/BgIntercom.config.php.dist
toconfig/autoload/BgIntercom.config.php
and fill in yourapp_id
. - echo the view helper in your layout
<?= $this->intercom() ?>
##NOTE:
Intercom.io requires a created_at
field, however ZfcUser does not support this out of the box.
To overcome this, this module will:
- Check for a getter method for created_at (default: getCreatedAt()) on the User object. If found (assumes a DateTime object is returned) it will send this as the created_at timestamp. This obviously assumes that you have extended the ZfcUser User entity.
- Fallback to a default create_at datetime if the method is not found.
Both the getter method name & fallback date are configurable - see BgIntercom.config.php.dist.
Get in touch and/or PR if this doesn't meet your needs.