定制 chomenko/extra-form 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

chomenko/extra-form

Composer 安装命令:

composer require chomenko/extra-form

包简介

README 文档

README

What do you do?

  • Ability to work with the entity
  • Rendering bootstrap style
    • Grid allows you to create custom layouts without using templates
    • Input group
  • Allows you to use it symfony/validator in entities
  • Can be used on relation entity pairs list

Required:

  • nette/di
  • nette/forms
  • symfony/validator
  • kdyby/doctrine
  • nettpack/stage

Install

$ composer require chomenko/extra-form

Configure

extensions:
	ExtraForm: Chomenko\ExtraForm\DI\ExtraFormExtension

Events

Look on this example Simple event. Service tag extraForm.events.

If you do not use auto-install.

services:
	SimpleEvent:
		class: Examples\SimpleEvent\Event
		tags: ["extraForm.events"]

Form events

  • CRETE_FORM
  • INSTALL_ENTITY
  • BEFORE_ADD_COMPONENT
  • ADD_COMPONENT
  • BEFORE_RENDER
  • AFTER_RENDER

Elements events

  • ATTACHED
  • INSTALLED
  • SET_OPTION
  • ADD_CONSTRAINT
  • LOAD_HTTP_DATA
  • AFTER_LOAD_HTTP_DATA
  • SET_ITEMS
  • SET_VALUE
  • RENDER

There are not all things I want now.

Examples

To create the first form, look at the class Chomenko\ExtraForm\FormFactory

Entity forms

Events

Rendering

Builder preserve the order of the elements, so if you need to edit only two elements, you do not have to edit the whole form

<?php

	//......
	
	/**
	 * @return ExtraForm
	 */
	public function create(): ExtraForm
	{
		$form = $this->createForm();
		
		$form->addText('name', 'Name')
			->setRequired();
		
		$form->addText('surname', 'Surname')
			->setRequired();
		
		$form->addPassword('password', 'Password')
			->setRequired();
		
		$form->addSubmit('send', 'Sign in');
		
		$builder = $form->builder();
		
		$row = $builder->addRow();
		$row->addColMd(6, "name");
		$row->addColMd(6, ["surname"]);
		
		return $form;
	}
	
	//......
	

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2018-11-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固