定制 webburza/sylius-article-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

webburza/sylius-article-bundle

Composer 安装命令:

composer require webburza/sylius-article-bundle

包简介

Article bundle for Sylius e-commerce platform.

README 文档

README

This bundle extends the Sylius e-commerce platform with Article resource, which can be used to publish news, articles, or as a blog. It comes with full multilingual support, the ability to group articles into categories, and the ability to set related products for articles.

Installation

  1. require the bundle with Composer:
$ composer require webburza/sylius-article-bundle
  1. enable the bundle in app/AppKernel.php:
public function registerBundles()
{
  $bundles = array(
    // ...
    new \Webburza\Sylius\ArticleBundle\WebburzaSyliusArticleBundle(),
    // ...
  );
}
  1. add configuration to the top of app/config/config.yml:
imports:
    - { resource: "@WebburzaSyliusArticleBundle/Resources/config/config.yml" }
  1. register routes in app/config/routing.yml
webburza_article:
    resource: "@WebburzaSyliusArticleBundle/Resources/config/routing.yml"

webburza_article_front:
    resource: "@WebburzaSyliusArticleBundle/Resources/config/routingFront.yml"
    prefix:  /articles

As you can see, there are two groups of routes, the main resource (administration) routes, and the front-end routes. If you're using the bundle for a blog, or news, you can set the prefix for the routes here, changing it to /blog, or /news.

  1. The bundle should now be fully integrated, but it still requires database tables to be created. For this, we recommend using migrations.
$ bin/console doctrine:migrations:diff
$ bin/console doctrine:migrations:migrate

Or if you don't use migrations, you can update the database schema directly.

  $ bin/console doctrine:schema:update

Configuration

Translations and naming (blog, news, articles...)

The bundle has multilingual support, and language files can be overridden as with any other bundle, by creating translation files in the app/Resources/WebburzaSyliusArticleBundle/translations directory.

This also allows for different naming, so if you're using the bundle as a blog, or as a source of latest news, you can replace all mentions of articles with that of blog, news, or something else completely.

To get started, check the bundle's main language file in: Resources/translations/messages.en.yml

File repository integration in rich-text editors

The bundle uses rich-text editors (CKEditor) to work with content, which allows the user to work with images in the content as well.

By default, this is limited to specifying the URL to the image manually, but if your application integrates a file repository system for editors, such as CKFinder, or the free alternative KCFinder, you can easily add the functionality to allow the users to upload and work with image files directly trough the rich-text editor.

To accomplish this, simply fill in the bundle's configuration with your file browser URI's, as seen in the example bellow:

# ...

webburza_sylius_article:
    file_browser:
        browse_url: "/browser/browse.php"
        upload_url: "/uploader/upload.php"

This will add file upload and browse controls to your rich-text editors. For more information, see http://docs.ckeditor.com/#!/guide/dev_file_browse_upload

License

This bundle is available under the MIT license.

To-do

  • Automated tests

统计信息

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

GitHub 信息

  • Stars: 27
  • Watchers: 3
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固