PHPackages                             cmnty/push-bundle - 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. [API Development](/categories/api)
4. /
5. cmnty/push-bundle

AbandonedArchivedSymfony-bundle[API Development](/categories/api)

cmnty/push-bundle
=================

Symfony Bundle for cmnty/push

0.0.2(9y ago)113.4k1MITPHPPHP ~5.6|~7.0

Since Sep 7Pushed 9y ago1 watchersCompare

[ Source](https://github.com/cmnty/php-push-bundle)[ Packagist](https://packagist.org/packages/cmnty/push-bundle)[ RSS](/packages/cmnty-push-bundle/feed)WikiDiscussions master Synced 2d ago

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

CmntyPushBundle
===============

[](#cmntypushbundle)

[![Latest Version on Packagist](https://camo.githubusercontent.com/027baa0bb8ede81d8fd0fce801b3411929c043238287d8ece48ac335f13a7afc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636d6e74792f707573682d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cmnty/push-bundle)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/a9ec84942b0b703ffd819a9ed682df098db9c95f4260e1b2cb50500adf6dfcd8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636d6e74792f707573682d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cmnty/push-bundle)

Symfony Bundle for [cmnty/push](https://github.com/cmnty/php-push).

Instalation
-----------

[](#instalation)

Require the bundle with composer:

```
composer require cmnty/push-bundle
```

Register the bundle in `app/AppKernel.php`:

```
public function registerBundles()
{
    $bundles = [
        // ...
        new Cmnty\PushBundle\CmntyPushBundle(),
        // ...
    ];

    return $bundles;
}
```

Configuration
-------------

[](#configuration)

```
cmnty_push:
    push_services:
        google:
            enabled: true # Default false, automatically true when api_key is supplied.
            api_key: "%gcm_sender_id%" # Required value.
        mozilla:
            enabled: true # Default true
```

If you plan on storing the push subscriptions using doctrine, you can use the provided mappings by this bundle.

```
# Doctrine Configuration
doctrine:
    dbal:
        types:
            binary_string: Cmnty\PushBundle\Doctrine\Type\BinaryStringType
    orm:
        mappings:
            PushSubscription:
                type: xml
                prefix: Cmnty\Push
                dir: "%kernel.root_dir%/../vendor/cmnty/push-bundle/src/Resources/config/embeddable"
                is_bundle: false
```

Usage
-----

[](#usage)

```
