2017 © Pedro Peláez
 

library mamuz-contact

Provides simple contact form rendered by twitter-bootstrap view helper for ZF2 with Doctrine

image

mamuz/mamuz-contact

Provides simple contact form rendered by twitter-bootstrap view helper for ZF2 with Doctrine

  • Thursday, August 20, 2015
  • by mamuz
  • Repository
  • 1 Watchers
  • 3 Stars
  • 830 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

MamuzContact

Build Status Coverage Status Scrutinizer Code Quality SensioLabsInsight HHVM Status Dependency Status, (*1)

Latest Stable Version Latest Unstable Version Total Downloads License, (*2)

Features

  • This module provides a contact form based on ZF2 and Doctrine2.
  • Submitted contact forms will persist in repository.
  • Captcha support is provided to force submitting by humans.
  • Views are twitter-Bootstrap compatible.

Installation

The recommended way to install mamuz/mamuz-contact is through composer by adding dependency to your composer.json:, (*3)

{
    "require": {
        "mamuz/mamuz-contact": "*"
    }
}

After that run composer update and enable this module for ZF2 by adding MamuzContact to modules in ./config/application.config.php:, (*4)

// ...
    'modules' => array(
        'MamuzContact',
    ),

This module is based on DoctrineORMModule and be sure that you have already configured database connection., (*5)

Create database tables with command line tool provided by DoctrineORMModule:, (*6)

./vendor/bin/doctrine-module orm:schema-tool:update

Configuration

This module is usable out of the box, but you can overwrite default configuration by adding a config file in ./config/autoload directory. For default configuration see module.config.php, (*7)

Captcha Support

Create a new config file and place it to ./config/autoload directory and insert configuration array for Zend Captcha form element factory. Array must be indexed by key captcha, for e.g.:, (*8)

return array(
    'captcha' => array(
        'type'       => 'Zend\Form\Element\Captcha',
        'name'       => 'captcha',
        'options'    => array(
            'label'   => 'Please verify you are human',
            'captcha' => array(
                'class'   => 'recaptcha',
                'options' => array(
                    'pubkey'  => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
                    'privkey' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
                ),
            ),
        ),
        'attributes' => array(
            'required' => 'required'
        ),
    ),
);

Requirement for Google ReCaptcha WebService

Register your domain to Google ReCaptcha WebService to create a private key and a public key. Be sure that private key will not commit to VCS., (*9)

Workflow

After filtering and validation of user input a new contact entity will persist in repository MamuzContact., (*10)

Events

For the sake of simplicity Event is used for FQN MamuzContact\EventManager\Event., (*11)

The following events are triggered by Event::IDENTIFIER mamuz-contact:, (*12)

Name Constant Description
persist.pre Event::PRE_PERSISTENCE Before contact entity persistence
persist.post Event::POST_PERSISTENCE After contact entity persistence

The Versions

26/07 2014

0.1.3

0.1.3.0 https://github.com/mamuz/MamuzContact

Provides simple contact form rendered by twitter-bootstrap view helper for ZF2 with Doctrine

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marco Muths

form zf2 doctrine contact twitter-bootstrap mamuz

25/07 2014

0.1.2

0.1.2.0 https://github.com/mamuz/MamuzContact

Provides simple contact form rendered by twitter-bootstrap view helper for ZF2 with Doctrine

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marco Muths

form zf2 doctrine contact twitter-bootstrap mamuz

21/07 2014

0.1.1

0.1.1.0 https://github.com/mamuz/MamuzContact

Provides simple contact form rendered by twitter-bootstrap view helper for ZF2 with Doctrine

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marco Muths

form zf2 doctrine contact twitter-bootstrap mamuz

21/06 2014

0.1.0

0.1.0.0 https://github.com/mamuz/MamuzContact

Provides simple contact form rendered by twitter-bootstrap view helper for ZF2 with Doctrine

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marco Muths

form zf2 doctrine contact twitter-bootstrap mamuz