axis/axis-twig-plugin 问题修复 & 功能扩展

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

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

axis/axis-twig-plugin

Composer 安装命令:

composer require axis/axis-twig-plugin

包简介

symfony 1.x plugin that integrates twig templating engine to be used with symfony.

README 文档

README

This plugin integrates Twig templating engine into symfony.

Installation

Composer way

Just add axis/axis-twig-plugin dependency to your composer.json file:

"require": {
  "axis/axis-twig-plugin": "dev-master"
}

Configuration

You can configure Twig environment using factories.yml (see AxisServiceContainerPlugin).

Usage

You can use Twig directly by retrieving Twig Environment from context service container:

$twig = sfContext::getInstance()->get('twig');
$twig->loadTemplate($pathToTemplate)->render($variables);

or as symfony view by setting it as view class in module.yml:

all:
  view_class: \Axis\S1\Twig\View\Base # means BaseView
  partial_view_class: \Axis\S1\Twig\View\Base # means BasePartialView

after that your application will switch to .twig templates for layouts, partials and action views.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-11-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固