Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [ZendFramework] layout i zend_form
kociupk
post
Post #1





Grupa: Zarejestrowani
Postów: 97
Pomógł: 1
Dołączył: 29.03.2006

Ostrzeżenie: (0%)
-----


zastanawiam sie jak przekazac formularz do layout, odebrac dane i sprawdzic czu uzytkownik jest zalogowany

mam plik indexController ktory przekazuje formularz do helpera
  1. class IndexController extends Zend_Controller_Action
  2. {
  3. function init()
  4. {
  5. $form = new App_Form_Login();
  6. $helper= $this->_helper->getHelper('formlogin');
  7. $helper->formlogin($form);
  8. }
  9. }

plik helper FormLogin

  1. class Zend_View_Helper_FormLogin extends Zend_View_Helper_Abstract
  2. {
  3. private $form;
  4.  
  5. public function formlogin($form)
  6. {
  7. return $form;
  8. }
  9. }

plik bootstrap
  1. protected function _initViewHelper()
  2. {
  3. $this->bootstrap('layout');
  4. $layout = $this->getResource('layout');
  5. $view = $layout->getView();
  6.  
  7. $form = new Zend_View_Helper_FormLogin();
  8. $view = $form->formlogin();
  9. }

nie wiem czy to dziala wszystko pisane z palca chce sie dowiedziec czy mam dobry tok myslenia czy to tak ma mniej wiecej wygladac

Ten post edytował kociupk 10.04.2010, 14:18:51
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.08.2025 - 12:54