Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

7. Den Ablauf mit Controllern steuern > Das Verhalten der Extension konfigurier...

Das Verhalten der Extension konfigurieren

In unserer Beispiel-Extension sollen nicht alle Organisationen ausgegeben werden, sondern nur solche, die zu einem bestimmten Status gehören (z.B. Intern, Extern, Nichtmitglied). Im TypoScript-Template unserer Seite richten wir daher unter dem Pfad plugin.tx_sjroffers.settings eine Option allowedStates ein :

plugin.tx_sjroffers {
   settings {
      allowedStates = 1,2
   }
}

Extbase stellt die Einstellungen unterhalb des Pfades plugin.tx_sjroffers.settings als Array in der Klassenvariablen $this->settings zu Verfügung. Unsere Action sieht damit wie folgt aus:

public function indexAction() {
   $this->view->assign('organizations', $this->organizationRepository->
   findByStates(t3lib_div::intExplode(',', $this->settings['allowedStates'])));
   ...
}

  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint