gnugat/redaktilo-bundle 问题修复 & 功能扩展

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

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

gnugat/redaktilo-bundle

最新稳定版本:v1.5.2

Composer 安装命令:

composer require gnugat/redaktilo-bundle

包简介

Provides Redaktilo's Editor and TextFactory as services

README 文档

README

Provides the following services from Redaktilo in a Symfony2 application:

Documentation:

SensioLabsInsight Travis CI

Extending

You can also extend Redaktilo by creating new SearchStrategy and new Command.

To make your custom Command and SearchStrategy available, simply define them as services in your Symfony2 application and tag them:

services:
    acme_redaktilo.custom_command:
        class: Acme\RedaktiloBundle\Command\CustomCommand
        tags:
            - { name: redaktilo.command }

    acme_redaktilo.custom_search_strategy:
        class: Acme\RedaktiloBundle\Search\SearchStrategy
        tags:
            - { name: redaktilo.search_strategy, priority: 20 }

Note: SearchStrategy's priority is optionnal (defaults to 0). The higher the priority is, the sooner SearchEngine will check if the SearchStrategy supports the given pattern.

Installation

Use Composer to install the bundle:

composer require gnugat/redaktilo-bundle:^1.0

Then register the bundle in you kernel. For example:

<?php
// File: app/AppKernel.php

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        return array(
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            new Gnugat\RedaktiloBundle\GnugatRedaktiloBundle(),
        );
    }

    public function registerContainerConfiguration(LoaderInterface $loader)
    {
        $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
    }
}

Usage with Symfony2 DependencyInjection Component standalone

If you're not using the full stack framework, but rather just the Symfony2 DependencyInjection Component, you can still use this bundle:

<?php

use Gnugat\RedaktiloBundle\DependencyInjection\CommandCompilerPass;
use Gnugat\RedaktiloBundle\DependencyInjection\SearchStrategyCompilerPass;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

$container = new ContainerBuilder();
$fileLocator = new FileLocator(__DIR__.'/vendor/gnugat/redaktilo/Resources/config');
$loader = new YamlFileLoader($container, $fileLocator);

$loader->load('services.yml');
$container->addCompilerPass(new SearchStrategyCompilerPass());
$container->addCompilerPass(new CommandCompilerPass());

Further documentation

You can see the current and past versions using one of the following:

You can find more documentation at the following links:

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固