Escolar Documentos
Profissional Documentos
Cultura Documentos
Overview
Part 3: Libraries
(l"gins
sstem
tem(lates
tl)files
t(olight
sstem
config
drivers
html
libraries
logs
mod"les
themes
tm(
Part 1: TYPOlight folders
(l"gins
tem(lates
tl)files
t(olight
sstem8config
sstem8drivers
sstem8html
sstem8libraries
sstem8logs
sstem8mod"les
sstem8themes
sstem8tm(
$eviation list
.odels
$this->import('BackendUser', 'User');
echo $this->User->isAdmin; // False
$this->User->admin = 1;
$this->User->sae();
echo $this->User->isAdmin; // !r"e
.odels onl (la a minor (art/ beca"se the goal was to (rogram
com(rehensive drivers that can create different views and (rocess
forms on the basis of meta informations
=iews
Loading views
2irst hit wins -if the tem(late e4g4 e+ists in the ;backend< mod"le/
another tem(late with the same name in the ;news< mod"le will
never be loaded5
Part 2: TYPOlight framework B =iews
Parsing views
O"t("tting views
9ackendTem(late::o"t("t-5
2rontendTem(late::o"t("t-5
$namic scri(ts
$#$%BA$&''!$()&&'*'* = 's+stem/mod"les/ne,s/st+le-css';
;=irt"al controller<
7dvantages of 0stem::im(ort-5
H
Part 3: Libraries B &ontroller
$atabase abstraction
$d. = $this->/ata.ase;
$stmt = $d.->prepare('&0$0)! 1 F2%3 tl("ser 45020 name=6');
$stmt->limit(1); // 7nconsistent, there8ore encaps"lated
$"ser = $stmt->e9ec"te('!heo !est');
,hile ($"ser->ne9t())
:
echo $"ser->name;
;
:owever/ files that have been "(loaded via 2TP t(icall belong
to the 2TP "ser -e4g4 ;web#< or ;+a23LM<5
The server denies the P:P (rocess -and th"s TYPOlight5 access
to the s"((osedl alien files
0ol"tions
?"n the P:P (rocess "nder the same "ser who owns the files
that have been "(loaded via 2TP
$this->import('Files');
$8h = $this->Files->8open('s+stem/tmp/test-t9t', ',.');
$this->Files->8p"ts($8h, '!his is a test-');
$this->Files->8close($8h);
0ec"rit in TYPOlight
Step 2: Dava0cri(t sni((ets are being removed -in Jstrict mode; all
event attrib"tes are being removed as well5
0ec"ring forms
$#$%BA$&''!$(/)A'*?''eal'*''encr+pt'* = tr"e;
1idgets
O"t("tting widgets
@la.el 8or=Actrl(nameA>>ame@/la.el>
In("t validation
$ail e+ec"tion
1eekl e+ec"tion
H 1 1 1 1 php /home/,,,/t+poliCht/cron-php
))a"toload-5
&ontroller::class2ile*+ists-5
scan-5
s(ecialchars-5
deseriali'e-5
trims(lit-5
am(ersand-5
natcaseksort-5
arra)insert-5
arra)d"(licate-5
arra)move)"(-5
arra)move)down-5
arra)delete-5
arra)is)assoc-5
mbstring4(h(
(h(4ini c"stomi'ation
sstem8mod"les8backend8config8config4(h(
sstem8mod"les8frontend8config8config4(h(
Inactive e+tensions
&onfig"ration arras
&ontent elements
$#$%BA$&''!$()%>F7#'*''!$()!0'*
2"rther config"ration
?eferer check
Eoogle 7naltics I$
The (age title and descri(tion are being added at the end
Part 4: Life ccle of a 2* re!"est B Printing a (age
9ack end forms are also rendered on the basis of this meta data
The $&7 files of the active mod"les are loaded one after the other
-backend/ frontend and then in al(habetical order5
&onfig"ration
=ersioning
Listing
O(erations
Palettes
2ields
*val"ation
$ata encr(tion
H
Part #: $ata container arras B &allbacks
onload)callback
ons"bmit)callback
7llows o" to e4g4 modif the form data before it is written to the
database -"sed to calc"late intervals in the calendar e+tension5
Part #: $ata container arras B &allbacks
ondelete)callback
?"ns before the records are act"all removed from the database
(aste)b"tton)callback
child)record)callback
2rom version 24M/ child elements can be moved via $rag T $ro(
-e4g4 content elements/ format definitions/ 276s etc45
label)callback
*4g4 "sed in the "ser mod"le to add stat"s icons to the "ser list
-administrator8"ser/ active8inactive5
Part #: $ata container arras B &allbacks
b"tton)callback
o(tions)callback
in("t)field)callback
*4g4 "sed in the back end mod"le ;(ersonal data< to generate the
;("rge data< widget
load)callback
save)callback
In this worksho(
@ser registration
2orms
@?L generation
Tem(lates
.iscellaneo"s
$#$%BA$&''!$()%>F7#'*''F0(3%/'*''naiCation3en"'*
''naiCation'* = '3od"le3+>aiCation';
$namic config"ration