werkint/templating-bundle 问题修复 & 功能扩展

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

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

werkint/templating-bundle

最新稳定版本:v0.1.1

Composer 安装命令:

composer require werkint/templating-bundle

包简介

README 文档

README

Deprecated

use twig compile instead; and you can use bower

Composer

composer require 'werkint/templating-bundle:dev-master'

Kernel

AppKernel::registerBundles:

        ...
    new \Werkint\Bundle\TemplatingBundle\WerkintTemplatingBundle()
        ...

Routing

app/config/routing.yml:

    werkint_templating.:
      resource: "@WerkintTemplatingBundle/Resources/config/routing.yml"
      prefix: "/api"
      options:
        expose: true
$router->generate('ajax_templating', ['template' => '@YourBundle/Some/someTemplate.twig'])

OR

define([
    'some-module/views/view',
    'werkint-templating/template!@YourBundle/Some/someTemplate.twig'
], function (View, template) {
    'use strict';

    return View.extend({
        'template': template,
    });
});

JS

bower install template --save

or include web/bundles/werkinttemplating/js/*.js

Public templates

@YourBundle/Resources/config/templates.yml:

parameters:
  your_bundle.public_templates:
    - @@YourBundle/Some/someTemplate.twig
services:
  your_bundle.public_template_provider:
    class: Your\Bundle\SomeBundle\Service\TemplateProvider
    arguments:
      - % your_bundle.public_templates%
    tags:
      - {name: werkint_templating.public_template }

Or Werkint\Bundle\TemplatingBundle\Service\TemplateProviderInterface

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-09