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
730
PWA in Practice
moveelevator
0
140
Extbase: Alternativen zu "findAll"
moveelevator
0
470
Structured Data mit TYPO3
moveelevator
0
110
So geht Employer Branding
moveelevator
0
500
Kundenportale mit TYPO3
moveelevator
0
170
React Native Web
moveelevator
1
150
Other Decks in Programming
See All in Programming
App Intentsのビルドプロセスを支える技術
kntkymt
0
400
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
120
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
290
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
350
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
0
1.5k
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
3
550
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
350
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
430
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.8k
Java 27新機能 / Java 27 new features
kishida
2
150
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
150
スマート反転とウェブアクセシビリティ
camiha
0
210
Featured
See All Featured
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
410
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
480
Crafting Experiences
bethany
1
350
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Marketing to machines
jonoalderson
1
5.8k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
940
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Product Roadmaps are Hard
iamctodd
55
13k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
540
My Coaching Mixtape
mlcsv
0
320
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