Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // UjhirdetesController.php
- class UjhirdetesController extends Zend_Controller_Action
- {
- /* ... */
- public function getAdatokForm($htipus){
- return new Application_Form_UjHirdetesAdatok(array(
- 'action' => SITE_PATH.'/ujhirdetes/adatokprocess',
- 'method' => 'post',
- 'tipus' => $htipus
- ));
- }
- /* ... */
- public function adatokAction()
- {
- $form = $this->getAdatokForm(2);
- $this->view->form = $form;
- }
- /* ... */
- }
- // UjHirdetesAdatok.php
- class Application_Form_UjHirdetesAdatok extends Zend_Form
- {
- protected $tipus;
- public function init()
- {
- $tovabb = $this->addElement('submit', 'tovabb'.$this->getTipus(), array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Tovább',
- ));
- $this->setDecorators(array(
- array('viewScript', array('viewScript' => 'ujhirdetes/adatokForm.phtml'))
- ));
- }
- public function setTipus($hhtipus)
- {
- $this->_tipus = $hhtipus;
- }
- public function getTipus()
- {
- return $this->_tipus;
- }
- }
- /*
- Message:
- Only form elements and groups may be overloaded; variable of type "integer" provided
- Stack trace:
- #0 /var/www/dev.sigmanet.hu/ingatlanpark/application/forms/UjHirdetesAdatok.php(23): Zend_Form->__set('_tipus', 2)
- #1 /var/www/dev.sigmanet.hu/ingatlanpark/library/Zend/Form.php(372): Application_Form_UjHirdetesAdatok->setTipus(2)
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement