Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Einsatz eigener Extbase Controller Views
Search
move:elevator
January 17, 2017
Programming
0
300
Einsatz eigener Extbase Controller Views
Vortrag zum Meetup der TYPO3 User Group Dresden
move:elevator
January 17, 2017
Tweet
Share
More Decks by move:elevator
See All by move:elevator
Event Sourcing
moveelevator
0
100
Agile Organisation
moveelevator
0
790
Middleware in TYPO3
moveelevator
0
670
PWA in Practice
moveelevator
0
110
Extbase: Alternativen zu "findAll"
moveelevator
0
420
Structured Data mit TYPO3
moveelevator
0
85
So geht Employer Branding
moveelevator
0
450
Kundenportale mit TYPO3
moveelevator
0
140
React Native Web
moveelevator
1
110
Other Decks in Programming
See All in Programming
俺流レスポンシブコーディング 2025
tak_dcxi
14
9.1k
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
570
ZOZOにおけるAI活用の現在 ~モバイルアプリ開発でのAI活用状況と事例~
zozotech
PRO
9
5.8k
GISエンジニアから見たLINKSデータ
nokonoko1203
0
170
Cell-Based Architecture
larchanjo
0
140
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
1.5k
Integrating WordPress and Symfony
alexandresalome
0
160
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
440
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
4
880
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
190
TUIライブラリつくってみた / i-just-make-TUI-library
kazto
1
400
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
230
Featured
See All Featured
Code Review Best Practice
trishagee
74
19k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
390
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
1.9k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
0
26
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
115
91k
The Cult of Friendly URLs
andyhume
79
6.7k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
21
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.3k
Design in an AI World
tapps
0
91
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