n-sens/contact-bundle

联系表单插件

安装: 110

依赖: 0

建议者: 0

安全性: 0

星标: 0

关注者: 2

分支: 0

公开问题: 0

类型:symfony-bundle

1.1.1 2016-10-16 20:13 UTC

This package is not auto-updated.

Last update: 2024-09-28 17:49:22 UTC


README

步骤 1: 下载插件

打开命令行控制台,进入你的项目目录,并执行以下命令以下载此插件的最新稳定版本

$ composer require n-sens/contact-bundle "~1"

此命令需要您全局安装了Composer,具体请参考Composer文档中的安装章节

步骤 2: 启用插件

然后,通过将插件添加到项目中 app/AppKernel.php 文件中注册的插件列表来启用该插件

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new NS\ContactBundle\NSContactBundle(),
        );

        // ...
    }

    // ...
}
$ php app/console doctrine:schema:update --force

步骤 3: 配置

# config.yml

# NSContactBundle Configuration
ns_contact:
    subject: Message de contact
    emailto: mohand@n-sens.com
    sender_name: Application
    template: NSContactBundle:Emails:template.html.twig
    disable_delivery: false
    success_url: ns_contact
# routing.yml

# NSContactBundle Routes
ns_contact:
    resource: "@NSContactBundle/Resources/config/routing.yml"
    prefix:   /