webit/shipment-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

webit/shipment-bundle

最新稳定版本:3.1.1

Composer 安装命令:

composer require webit/shipment-bundle

包简介

Web-IT Shipment Library Symfony 2 integration

README 文档

README

Shipment library Symfony 2 integration

Installation

via Composer

Add the webit/shipment-bundle into composer.json

{
    "require": {
        "php":              ">=5.3.2",
        "webit/shipment-bundle": "dev-master"
    },
    "autoload": {
        "psr-0": {
            "Acme": "src/"
        }
    }
}

Register bundle in Kernel

Add following lines:

// in AppKernel::registerBundles()
$bundles = array(
    // ...
    new Webit\Bundle\ShipmentBundle\WebitShipmentBundle(),
    new Doctrine\Bundle\DoctrineBundle\DoctrineBundle()
    // ...
);

Notice: Remember to add WebitShipmentBundle before DoctrineBundle (because of Target Entity Resolver)

Configuration

You can define as much accounts as you need (ADE Accounts and Track & Trace as well)

webit_shipment:
    orm:
        entities:
            sender_address: Your\SenderAddress\Entity # required
            delivery_address: Your\DeliveryAddress\Entity # required
            consignment: Webit\Bundle\ShipmentBundle\Entity\Consignment # default, can skip
            parcel: Webit\Bundle\ShipmentBundle\Entity\Parcel # default, can skip
            dispatch_confirmation: Webit\Bundle\ShipmentBundle\Entity\DispatchConfirmation # default, can skip

Mapping

If you're going to use default implementation for entities add following lines to ORM configuration:

yaml
doctrine:
    dbal:
    # your dbal config here
    orm:
        auto_generate_proxy_classes: %kernel.debug%
        auto_mapping: true
        # only these lines are added additionally
        mappings:
            WebitShipmentBundle:
                type: xml
                prefix: Webit\Bundle\ShipmentBundle\Entity
                dir: %kernel.root_dir%/../vendor/webit/shipment-bundle/src/Resources/config/doctrine/orm

To learn more about shipment library see https://github.com/dbojdo/shipment

统计信息

  • 总下载量: 149
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-01