jhse-labs/mezzio-twig-viewhelper 问题修复 & 功能扩展

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

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

jhse-labs/mezzio-twig-viewhelper

最新稳定版本:1.1.3

Composer 安装命令:

composer require jhse-labs/mezzio-twig-viewhelper

包简介

Bridges laminas view helpers to the twig environment when running a mezzio application

README 文档

README

Within mezzio applications, this module bridges the classic laminas view helpers to the twig environment enabled by mezzio-twigrenderer. You can use all laminas view helpers (e.g. for rendering laminas-form components) seamlessly from you twig templates.

This is inspired by kokspflanze/zfc-twig, the module that achieved this functionality for laminas-mvc.

Installation

Install the library using composer:

composer require jhse-labs/mezzio-twig-viewhelper

Enable the module in config.php:

<?php

$aggregator = new ConfigAggregator([
    \JhseLabs\MezzioTwigViewHelper\ConfigProvider::class,
    ...

The laminas view helper support is added to your Twig\Environment instance automatically via registering a delegator factory.

Usage

Within your Twig templates you can now call all your laminas view helpers:

<head>
    {{ headTitle('Login Page') }}
</head>
<body>
    {{ form(loginForm) }}
</body>

Since version 1.1.0 it is possible to call laminas view helpers with named arguments:

{{ form(form=loginForm, method='POST') }}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-01-31