Suche senden
Hochladen
Small Talk about the Symfony2 Form Component
•
2 gefällt mir
•
2,040 views
T
th0masr
Folgen
Melden
Teilen
Melden
Teilen
1 von 16
Empfohlen
96 Years of Temporary Taxation in Canada [infographic] via FBC
96 Years of Temporary Taxation in Canada [infographic] via FBC
Scott Pledger
Personal Branding
Personal Branding
DigiArabs
Onderzoek CO2 reductiepotentieel Duurzaam Inkopen kantoorgebouwen
Onderzoek CO2 reductiepotentieel Duurzaam Inkopen kantoorgebouwen
Netherlands Enterprise Agency (RVO.nl)
A Specter Legacy Ch 12
A Specter Legacy Ch 12
Kelyns
Http 2: Should I care?
Http 2: Should I care?
LivePerson
How to reset forgotten obiee 11 g rpd passwd
How to reset forgotten obiee 11 g rpd passwd
Ravi Kumar Lanke
Oracle applications r12.2.0 installation on linux
Oracle applications r12.2.0 installation on linux
Ravi Kumar Lanke
Maker Faire Singapore by TAKASU Masakazu [Oversea Maker Faire Meetup 2016 Tokyo]
Maker Faire Singapore by TAKASU Masakazu [Oversea Maker Faire Meetup 2016 Tokyo]
Nico-Tech Shenzhen/ニコ技深圳コミュニティ
Empfohlen
96 Years of Temporary Taxation in Canada [infographic] via FBC
96 Years of Temporary Taxation in Canada [infographic] via FBC
Scott Pledger
Personal Branding
Personal Branding
DigiArabs
Onderzoek CO2 reductiepotentieel Duurzaam Inkopen kantoorgebouwen
Onderzoek CO2 reductiepotentieel Duurzaam Inkopen kantoorgebouwen
Netherlands Enterprise Agency (RVO.nl)
A Specter Legacy Ch 12
A Specter Legacy Ch 12
Kelyns
Http 2: Should I care?
Http 2: Should I care?
LivePerson
How to reset forgotten obiee 11 g rpd passwd
How to reset forgotten obiee 11 g rpd passwd
Ravi Kumar Lanke
Oracle applications r12.2.0 installation on linux
Oracle applications r12.2.0 installation on linux
Ravi Kumar Lanke
Maker Faire Singapore by TAKASU Masakazu [Oversea Maker Faire Meetup 2016 Tokyo]
Maker Faire Singapore by TAKASU Masakazu [Oversea Maker Faire Meetup 2016 Tokyo]
Nico-Tech Shenzhen/ニコ技深圳コミュニティ
5 Dos and 5 Don'ts of Networking!
5 Dos and 5 Don'ts of Networking!
Andeel Ali
How to install windows vista
How to install windows vista
Ravi Kumar Lanke
F O T O S I N T E S I S - dhita
F O T O S I N T E S I S - dhita
Dhita Ayu Distarasiswa
Importing knowledge modules odi 10g and 11g
Importing knowledge modules odi 10g and 11g
Ravi Kumar Lanke
Social Media Workshop at Jordan University
Social Media Workshop at Jordan University
DigiArabs
John O’Brien – Tinker tailor
John O’Brien – Tinker tailor
Nico-Tech Shenzhen/ニコ技深圳コミュニティ
Set a password in a word document
Set a password in a word document
Ravi Kumar Lanke
イノベーションが生まれるエコシステム-Most Activeなアクセラレーション-
イノベーションが生まれるエコシステム-Most Activeなアクセラレーション-
Nico-Tech Shenzhen/ニコ技深圳コミュニティ
Step by step guide for setting up windows server 2012 domain controller
Step by step guide for setting up windows server 2012 domain controller
Ravi Kumar Lanke
Creating and configuring vnc sessions
Creating and configuring vnc sessions
Ravi Kumar Lanke
Windows server 2012 and group policy
Windows server 2012 and group policy
Ravi Kumar Lanke
CAS 2 Presentació
CAS 2 Presentació
Xavier Gil Amorós
2015 IJAD Grunefeld Design Effect acad devel progra leading educ change 13601...
2015 IJAD Grunefeld Design Effect acad devel progra leading educ change 13601...
Dé Nova Learning
Pakistan fights back
Pakistan fights back
Andeel Ali
Orden publico internacional
Orden publico internacional
Universidad de Sonora
Modern Governor for Bristol School Governors, July 2013
Modern Governor for Bristol School Governors, July 2013
Elaine Walton
Muhau
Muhau
won ho
Zara
Zara
Mcgill University
Jiuzhou
Jiuzhou
TELE-satellite ara
How to Shop for and Get the Best Home Loan Rates in 2014
How to Shop for and Get the Best Home Loan Rates in 2014
Eric Kandell
Running PHP on Nginx / PHP wgtn
Running PHP on Nginx / PHP wgtn
Harald Zeitlhofer
Improving Organizational Efficiency by Enhancing Organizational Effectiveness
Improving Organizational Efficiency by Enhancing Organizational Effectiveness
Mui Han Koh
Weitere ähnliche Inhalte
Andere mochten auch
5 Dos and 5 Don'ts of Networking!
5 Dos and 5 Don'ts of Networking!
Andeel Ali
How to install windows vista
How to install windows vista
Ravi Kumar Lanke
F O T O S I N T E S I S - dhita
F O T O S I N T E S I S - dhita
Dhita Ayu Distarasiswa
Importing knowledge modules odi 10g and 11g
Importing knowledge modules odi 10g and 11g
Ravi Kumar Lanke
Social Media Workshop at Jordan University
Social Media Workshop at Jordan University
DigiArabs
John O’Brien – Tinker tailor
John O’Brien – Tinker tailor
Nico-Tech Shenzhen/ニコ技深圳コミュニティ
Set a password in a word document
Set a password in a word document
Ravi Kumar Lanke
イノベーションが生まれるエコシステム-Most Activeなアクセラレーション-
イノベーションが生まれるエコシステム-Most Activeなアクセラレーション-
Nico-Tech Shenzhen/ニコ技深圳コミュニティ
Step by step guide for setting up windows server 2012 domain controller
Step by step guide for setting up windows server 2012 domain controller
Ravi Kumar Lanke
Creating and configuring vnc sessions
Creating and configuring vnc sessions
Ravi Kumar Lanke
Windows server 2012 and group policy
Windows server 2012 and group policy
Ravi Kumar Lanke
CAS 2 Presentació
CAS 2 Presentació
Xavier Gil Amorós
2015 IJAD Grunefeld Design Effect acad devel progra leading educ change 13601...
2015 IJAD Grunefeld Design Effect acad devel progra leading educ change 13601...
Dé Nova Learning
Pakistan fights back
Pakistan fights back
Andeel Ali
Orden publico internacional
Orden publico internacional
Universidad de Sonora
Modern Governor for Bristol School Governors, July 2013
Modern Governor for Bristol School Governors, July 2013
Elaine Walton
Muhau
Muhau
won ho
Zara
Zara
Mcgill University
Jiuzhou
Jiuzhou
TELE-satellite ara
How to Shop for and Get the Best Home Loan Rates in 2014
How to Shop for and Get the Best Home Loan Rates in 2014
Eric Kandell
Andere mochten auch
(20)
5 Dos and 5 Don'ts of Networking!
5 Dos and 5 Don'ts of Networking!
How to install windows vista
How to install windows vista
F O T O S I N T E S I S - dhita
F O T O S I N T E S I S - dhita
Importing knowledge modules odi 10g and 11g
Importing knowledge modules odi 10g and 11g
Social Media Workshop at Jordan University
Social Media Workshop at Jordan University
John O’Brien – Tinker tailor
John O’Brien – Tinker tailor
Set a password in a word document
Set a password in a word document
イノベーションが生まれるエコシステム-Most Activeなアクセラレーション-
イノベーションが生まれるエコシステム-Most Activeなアクセラレーション-
Step by step guide for setting up windows server 2012 domain controller
Step by step guide for setting up windows server 2012 domain controller
Creating and configuring vnc sessions
Creating and configuring vnc sessions
Windows server 2012 and group policy
Windows server 2012 and group policy
CAS 2 Presentació
CAS 2 Presentació
2015 IJAD Grunefeld Design Effect acad devel progra leading educ change 13601...
2015 IJAD Grunefeld Design Effect acad devel progra leading educ change 13601...
Pakistan fights back
Pakistan fights back
Orden publico internacional
Orden publico internacional
Modern Governor for Bristol School Governors, July 2013
Modern Governor for Bristol School Governors, July 2013
Muhau
Muhau
Zara
Zara
Jiuzhou
Jiuzhou
How to Shop for and Get the Best Home Loan Rates in 2014
How to Shop for and Get the Best Home Loan Rates in 2014
Ähnlich wie Small Talk about the Symfony2 Form Component
Running PHP on Nginx / PHP wgtn
Running PHP on Nginx / PHP wgtn
Harald Zeitlhofer
Improving Organizational Efficiency by Enhancing Organizational Effectiveness
Improving Organizational Efficiency by Enhancing Organizational Effectiveness
Mui Han Koh
Improving Organizational Efficiency by Enhancing Organizational Effectiveness
Improving Organizational Efficiency by Enhancing Organizational Effectiveness
Mui Han Koh
Plan In Multiple Dimensions With Story Maps
Plan In Multiple Dimensions With Story Maps
Tim Gifford
Creative Camp Mar08 Scrum Coclarity
Creative Camp Mar08 Scrum Coclarity
Gerard Hartnett
Final presentation-notes
Final presentation-notes
Maya Weinstein
Swift as a scripting language iOSDevUK14 Lightning talk
Swift as a scripting language iOSDevUK14 Lightning talk
Diego Freniche Brito
Assignment 3 Grading CriteriaMaximum PointsEvaluated and expla.docx
Assignment 3 Grading CriteriaMaximum PointsEvaluated and expla.docx
danielfoster65629
MadhuCoverLetter
MadhuCoverLetter
Madhu Ramanathan
Making Sense of Twig
Making Sense of Twig
Brandon Kelly
Hybrid cloud wiskyweb2012
Hybrid cloud wiskyweb2012
Combell NV
D higgins bilateral compression
D higgins bilateral compression
chrisnolan4
Diana Higgins Bilateral Compression
Diana Higgins Bilateral Compression
chrisnolan4
Building a Rails Interface
Building a Rails Interface
James Gray
Android Data Binding from zero
Android Data Binding from zero
Seyyed davud hosseiny
Using Social Media in College Access Campaigns
Using Social Media in College Access Campaigns
Jess Krywosa
Asp #1
Asp #1
Joni
Lecture 4: JavaServer Pages (JSP) & Expression Language (EL)
Lecture 4: JavaServer Pages (JSP) & Expression Language (EL)
Fahad Golra
Search Capabilities for Dynamic Web Content
Search Capabilities for Dynamic Web Content
goodfriday
Keys Fillauer City Presentation 2012 Kens Draft
Keys Fillauer City Presentation 2012 Kens Draft
heitmanaj03
Ähnlich wie Small Talk about the Symfony2 Form Component
(20)
Running PHP on Nginx / PHP wgtn
Running PHP on Nginx / PHP wgtn
Improving Organizational Efficiency by Enhancing Organizational Effectiveness
Improving Organizational Efficiency by Enhancing Organizational Effectiveness
Improving Organizational Efficiency by Enhancing Organizational Effectiveness
Improving Organizational Efficiency by Enhancing Organizational Effectiveness
Plan In Multiple Dimensions With Story Maps
Plan In Multiple Dimensions With Story Maps
Creative Camp Mar08 Scrum Coclarity
Creative Camp Mar08 Scrum Coclarity
Final presentation-notes
Final presentation-notes
Swift as a scripting language iOSDevUK14 Lightning talk
Swift as a scripting language iOSDevUK14 Lightning talk
Assignment 3 Grading CriteriaMaximum PointsEvaluated and expla.docx
Assignment 3 Grading CriteriaMaximum PointsEvaluated and expla.docx
MadhuCoverLetter
MadhuCoverLetter
Making Sense of Twig
Making Sense of Twig
Hybrid cloud wiskyweb2012
Hybrid cloud wiskyweb2012
D higgins bilateral compression
D higgins bilateral compression
Diana Higgins Bilateral Compression
Diana Higgins Bilateral Compression
Building a Rails Interface
Building a Rails Interface
Android Data Binding from zero
Android Data Binding from zero
Using Social Media in College Access Campaigns
Using Social Media in College Access Campaigns
Asp #1
Asp #1
Lecture 4: JavaServer Pages (JSP) & Expression Language (EL)
Lecture 4: JavaServer Pages (JSP) & Expression Language (EL)
Search Capabilities for Dynamic Web Content
Search Capabilities for Dynamic Web Content
Keys Fillauer City Presentation 2012 Kens Draft
Keys Fillauer City Presentation 2012 Kens Draft
Small Talk about the Symfony2 Form Component
1.
Form%Component% Form%Component%–%Thomas%Rabaix%–%sfPot%13/03/2012%
2.
An%Object%
Domain%Model%PaCern% Form%Component%–%Thomas%Rabaix%–%sfPot%13/03/2012%
3.
What%is%an%Object%?%
• Instance%of%a%class%definiHon% • Related%to%others%objects% – SeCer%and%GeCer%to%assign%values% – Values%stored%with%properHes% • Contains%methods%% % Data$Object$ Service$Object$ $ $ • Hold%Business%Data% • Hold%configura-on%data% • An%object%has%not%informaHon%about%how% • Know%how%to%manipulate%data% data%are%loaded.%(Does%not%know%what%an% • In%most%case,%only%one%instance%of%a% «%id%»%is%)% service.%All%services%are%available%through% • Many%instance%of%the%same%class% the%Service%Container%% definiHon.% • This%is%not%a%singleton!% Form%Component%–%Thomas%Rabaix%–%sfPot%13/03/2012%
4.
Data%Object%:%Car%Sample% • A%car%has%
– A%name% • A%car%is%linked%to% – A%main%Engine%:%inline%ediHon% – A%creaHon%date% • A%Engine%has%% – A%name% – A%power%value% Form%Component%–%Thomas%Rabaix%–%sfPot%13/03/2012%
5.
PropertyPath%&%PropertyPathMapper% • PropertyPath%
– Read%and%write%a%property%from%an%object% – Use%the%PHP%ReflecHon%API% • PropertyPathMapper%% – Iterate%across%form%definiHon%to%map%:% • Data%to%Form% • Form%to%Data% Form%Component%–%Thomas%Rabaix%–%sfPot%13/03/2012%
6.
DataTransformer% • Transform%the%data%into%an%internal%
representaHon%(PHP)%into%a%Form% representaHon%(human).%% – DateTime%instance%to%«%30/11/1981%»% – Main%transformers%:%DateTimeTransformer,% EnHtyTransformer,%ChoiceTransformer,%etc%…% • 2%Methods%% – transform%:%php%=>%human% – reverseTransform%:%human%=>%php% Form%Component%–%Thomas%Rabaix%–%sfPot%13/03/2012%
7.
Form% Form%Component%–%Thomas%Rabaix%–%sfPot%13/03/2012%
8.
Standard%Form%Lifecycle% CreaHon%
DefiniHon% Binding% View% Form%Component%–%Thomas%Rabaix%–%sfPot%13/03/2012%
9.
Symfony%Form%Lifecycle% FormFactory%
FormBuilder% Form% FormView% Type% FormBuilder% Type% createBuilder% getForm% buildView% buildForm% Form%Component%–%Thomas%Rabaix%–%sfPot%13/03/2012%
10.
Key%objects% • FormFactory$(service)%
– Contains%all%types%available%(tag%form.type)% • FormBuilder%(data)% – Contains%nested%informaHon%about%the%form%elements% – Hold%a%reference%to%the%FormFactory$ • Type$(service/data)% – Each%form%element%is%a%Type,%even%the%main%Form% • Create%a%FormBuilder%instance% – Alter%different%objects%during%the%form%lifecycle% • FormBuilder% • FormView% • Form%(data):%% – Hold%types%definiHons% – Hold%the%form%subject% – Responsible%for%binding%new%data%to%the%object% • FormView%(data):%% – contains%informaHon%about%how%to%render%the%form% Form%Component%–%Thomas%Rabaix%–%sfPot%13/03/2012%
11.
Let’s%play!%
CarType%and%EngineType% Form%Component%–%Thomas%Rabaix%–%sfPot%13/03/2012%
12.
CarType% • Fields$
– CreatedAt%:%dateHme% – Name%:%text% – Engine%:%sonata_demo_form_type_engine% • Custom%type%to%render%an%Engine%class% • Outline% – data_class% – FormBuilder% % Form%Component%–%Thomas%Rabaix%–%sfPot%13/03/2012%
13.
RescueEngine%Extension% • RescueEngine%:%choice%
– Custom%data%transformer%to%select%the%correct% engine% – Inherit%transformer%from%the%choice%type% • Home%work%:%implement%as%a%custom%type% • Outline% – DataTransformer% – Exercice%:%create%a%dedicated%RescueEngineChoiceType Form%Component%–%Thomas%Rabaix%–%sfPot%13/03/2012%
14.
Type%Extensions% Form%Component%–%Thomas%Rabaix%–%sfPot%13/03/2012%
15.
Twig%Template% • Custom%twig%template%
– No%communicaHon%with%the%current%template% – ImformaHons%are%defined%inside%a%FormView% instance%(Nested%FormView)% • Rendering%workflow% – Helpers%:%form_row,%form_rest,%form_errors%...% – Block’s%name%:%array%of%concatenated%informaHon% of%form%name%and%type%name%with%inheritance% Form%Component%–%Thomas%Rabaix%–%sfPot%13/03/2012%
16.
Custom%Block% • Found%out%a%valid%name%….% • Name%:%
– _sonata_demo_form_type_car_rescueEngine_label% – choice_label% – field_label% Form%Component%–%Thomas%Rabaix%–%sfPot%13/03/2012%