dakataa/crud-twig 问题修复 & 功能扩展

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

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

dakataa/crud-twig

最新稳定版本:v1.0.2

Composer 安装命令:

composer require dakataa/crud-twig

包简介

Symfony CRUD Frontend based on Twig

README 文档

README

This package is a sub-package of dakataa/crud and depending on it. Create beautiful CRUD Dashboard with no effort. You can customize colors, logo, icons, and also you can easy extends or change the Templates or Bootstrap Theme.

Setup

Install packages

composer require dakataa/crud-twig

Twig

Methods

Method Description
getRoute(name) Get Route by Action name or Controller Method name if action has no name
generatePath Generate URL Path by Action Name
generatePathByAction Generate URL Path by Action
hasAction Check for existing action by name

Component (Twig Macros)

Available Blocks

Component Description
ListView The component is used to display data in a grid.

How to extend or change the templates

You can easy extend every list, edit, view template by creating a new template in root project dir templates/crud/[entity]/[template].html.twig

{% extends '@DakataaCrudTwig/edit.html.twig' %}
{% block title %}
	New Title
{% endblock}

{% block form_start %}
	Before Form Begin
   {{ parent() }}
{% endblock %}

{% block form_body %}
	{{ form_row(form.modify.view.name) }}
	<hr>
	{{ form_rest(form.modify.view) }}
{% endblock %}

Javascript API

Data Fetcher

Ajax Validator

Validate and Display form errors without refreshing. Just add HTML attribute [data-ajax]

<form data-ajax="true" action="..." method="...">
	...
</form>

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 1
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-13