2017 © Pedro Peláez
 

symfony-bundle contact-bundle

Make a contact form easily with this bundle

image

thewellcom/contact-bundle

Make a contact form easily with this bundle

  • Saturday, June 18, 2016
  • by thewellcom
  • Repository
  • 2 Watchers
  • 1 Stars
  • 56 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

TheWellComContactBundle

Configuration:

In app/AppKernel.php, (*1)

class AppKernel extends Kernel
{
    ...

    public function registerBundles()
    {
        ...
        new TheWellCom\ContactBundle\TheWellComContactBundle(),
        ...
    }
}

You need to create your own ContactBundle., (*2)

And in YourProjectContactBundle.php:, (*3)

namespace YourProject\Bundle\ContactBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class YourProjectContactBundle extends Bundle
{
    public function getParent()
    {
        return 'TheWellComContactBundle';
    }
}

Create the entity Contact:, (*4)

And in YourProject\Bundle\ContactBundle\Entity\Contact.php:, (*5)

<?php

namespace TM\Bundle\ContactBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use TheWellCom\ContactBundle\Model\Contact as BaseContact;

/**
 * Contact.
 *
 * @ORM\Table(name="contact")
 * @ORM\Entity
 */
class Contact extends BaseContact
{
    ...
}

In app/config/config.yml:, (*6)

the_well_com_contact:
    mail_to: 'xy@domainname.com'
    site_name: 'Your site name'
    entity_class: 'YourProject\Bundle\ContactBundle\Entity\Contact'

In app/config/routing.yml, (*7)

the_well_com_contact:
    resource: "@TheWellComContactBundle/Resources/config/routing.yml"

Admin with sonataAdminBundle:

You need to install sonataAdminBundle: https://github.com/sonata-project/SonataAdminBundle, (*8)

ContactAdmin.php

If you need to add an admin manager, you just have to add in your ContactAdmin.php:, (*9)

namespace YourProject\Bundle\ContactBundle\Admin;

use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Show\ShowMapper;
use TheWellCom\ContactBundle\Admin\ContactAdmin as BaseAdmin;

class ContactAdmin extends BaseAdmin
{
    ...
}

service.yml

In your service.yml file add:, (*10)

services:
    admin.contact:
        class: YourProject\Bundle\ContactBundle\Admin\ContactAdmin
        arguments: [~, YourProject\Bundle\ContactBundle\Entity\Contact, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Contact }

The Versions

18/06 2016

dev-master

9999999-dev https://github.com/twcsamar/ContactBundle

Make a contact form easily with this bundle

  Sources   Download

MIT

The Requires

 

orm form symfony2 doctrine2

18/06 2016

1.1.1

1.1.1.0 https://github.com/twcsamar/ContactBundle

Make a contact form easily with this bundle

  Sources   Download

MIT

The Requires

 

orm form symfony2 doctrine2

09/06 2016

1.0

1.0.0.0 https://github.com/twcsamar/ContactBundle

Make a contact form easily with this bundle

  Sources   Download

MIT

The Requires

  • php >=5.3.9

 

orm form symfony2 doctrine2

09/06 2016

1.1

1.1.0.0 https://github.com/twcsamar/ContactBundle

Make a contact form easily with this bundle

  Sources   Download

MIT

The Requires

  • php >=5.3.9

 

orm form symfony2 doctrine2