[TYPO3-mvc] writing backend module

Johannes C. Schulz - EnzephaloN IT-Solutions info at enzephalon.de
Tue Feb 7 17:52:26 CET 2012


Hello list!

 

The next problem or misunderstanding while writing my
„accreditation“-extension.
Now I try to write a backend-module. I wrote a new controller called
BackendController.php which has an indexAction at first. In indexAction I
just tried to “findAll()” of my accreditations, before I went to write an
own repository-finder. But “findAll()” doesn’t find anything!
Controller:

public function indexAction($year = NULL){

for($y=date("Y");$y>=2012;$y--){

              $years[$y] = $y;

       }

       $this->view->assign('years',$years);

       if($year==NULL) $year = date("Y");

 
$this->view->assign('open',$this->accreditationRepository->findAll());

My second questions belongs to a “year”-filter. In template there is a
select-box. There I will choose the year of the accreditations. How I write
my indexAction to deal with this?

FLUID:

<f:form method="post" action="index" arguments="{year:years}" name="year">

       Jahr: <f:form.select options="{years}" />      <f:form.submit
value="Wählen" />

</f:form>

 

Hope anyone can help!

Best regards

Johannes



More information about the TYPO3-project-typo3v4mvc mailing list