Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Einsatz eigener Extbase Controller Views
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
move:elevator
January 17, 2017
Programming
310
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Einsatz eigener Extbase Controller Views
Vortrag zum Meetup der TYPO3 User Group Dresden
move:elevator
January 17, 2017
More Decks by move:elevator
See All by move:elevator
Event Sourcing
moveelevator
0
130
Agile Organisation
moveelevator
0
870
Middleware in TYPO3
moveelevator
0
740
PWA in Practice
moveelevator
0
140
Extbase: Alternativen zu "findAll"
moveelevator
0
490
Structured Data mit TYPO3
moveelevator
0
110
So geht Employer Branding
moveelevator
0
510
Kundenportale mit TYPO3
moveelevator
0
170
React Native Web
moveelevator
1
150
Other Decks in Programming
See All in Programming
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
260
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
270
すこし踏み込む CancellationToken
htkym
2
1.7k
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
420
ジョジョの世界をXRで再現する
mofurune
0
160
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
ActionController meets Protocol Buffers
sorah
0
450
Agents on Rails - Rails at Scale 2026
irinanazarova
0
550
最近”作らせてる” ローカルAIアプリの話
akit37
0
470
Domain-Driven Transformation
hschwentner
2
2.3k
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.2k
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
How to Ace a Technical Interview
jacobian
280
24k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
310
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
570
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Done Done
chrislema
187
17k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
270
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
HDC tutorial
michielstock
2
960
What's in a price? How to price your products and services
michaelherold
247
13k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
410
Transcript
GROUP
Eigene Extbase Controller Views
Jan Männig, Team Lead CMS-Development move:elevator
1. MVC-Pattern 2. Status Quo 3. Fluid Standard View 4.
Beispiel 5. Weiterführende Informationen Agenda
MVC-Pattern
MVC-Pattern VIEW CONTROLLER MODEL
Status Quo
„Controller, die eierlegende Wollmilchsau“
Status Quo - Auslagerung der Logik in Controller oder in
vom Controller ausgehende Objekte - meistens Abbruch durch die() oder exit
„Schuster, bleib bei deinem Leisten.“
Der View …
FluidTemplateView /** * @package JanMaennig\ExtbaseViewExample\Controller */ class RecordController extends ActionController
{ public function listAction() { $records = $this->recordRepository->findAll(); $this->view->assign('records', $records); } /** * @param \JanMaennig\ExtbaseViewExample\Domain\Model\Record $record */ public function singleAction(Record $record) { $this->view->assign('record', $record); } } Controller (Auszug)
FluidTemplateView <div class="container"> <div class="row"> <div class="col-xs-11"> <h1> {record.title} </h1>
</div> <div class="cols-xc-1"> <f:link.action action="single" controller="RecordPdf" arguments="{record: '{record}'}" additionalParams="{type:1234}"> <span class="glyphicon glyphicon-download"></span> </f:link.action> </div> </div> <div class="row"> <div class="col-xs-12"> <f:image src="{record.images.0.uid}" Template (Auszug)
FluidTemplateView
„Selbst ist der Developer“
Vorab etwas TypoScript
Nutzung eigener Views pdfView = PAGE pdfView { typeNum =
1234 config { admPanel = 0 debug = 0 } 10 < tt_content.list.20.extbaseviewexample_examplerecords } Einbindung des Plugins in eigenen Pagetype
Beispiel
Beispiel PDF-Druck der Detailansicht <?php namespace JanMaennig\ExtbaseViewExample\Controller; use
JanMaennig\ExtbaseViewExample\View\PdfView; /** * @package JanMaennig\ExtbaseViewExample\Controller */ class RecordPdfController extends RecordController { protected $defaultViewObjectName = PdfView::class; } PdfController, zur Änderung des „DefaultViewObjects“
Beispiel PDF-Druck der Detailansicht <?php namespace JanMaennig\ExtbaseViewExample\View; use
TYPO3\CMS\Fluid\View\TemplateView; class PdfView extends TemplateView { /** * @return void */ public function render() { header("Content-type:application/pdf"); $content = parent::render(); $mpdf = new \mPDF(); $mpdf->WriteHTML($content); $mpdf->Output('test.pdf', 'D'); return; } } PdfView abgeleitet vom TemplateView
PDF
Weiterführende Informationen
Weiterführende Informationen Vorteile - Klare Trennung zwischen Ausgabelogik und Controller
- kein „exit“ oder anderweitiger Abbruch der Logik im Controller notwendig - Einhaltung des Slim Controller Prinzips Nachteile - Weiterer Controller notwendig - zum Teil TypoScript (Pagetype) notwendig
Nutzungsmöglichkeiten - PDF-Download - Excel-Export - Verwendung anderer Template-Engines -
Bereitstellung von APIs - AJAX-Calls Weiterführende Informationen
Weitere Links - https://usetypo3.com/json-view.html - https://github.com/janmaennig/extbase-view-example/ Weitere Informationen
Vielen Dank!
Quellen Bilder / Fotos