%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/bbw/farmaci/kritik-portale/module/ReviewBase/src/ReviewBase/Form/
Upload File :
Create Path :
Current File : /var/www/html/bbw/farmaci/kritik-portale/module/ReviewBase/src/ReviewBase/Form/SearchForm.php

<?php
/**
 * Description of SearchForm
 *
 * @author Florian Koller ( conlabz GmbH ) <florian.koller at conlabz.de>
 */

namespace ReviewBase\Form;

use Zend\Form\Element\Hidden;
use Zend\Form\Element\Submit;
use Zend\Form\Element\Text;
use Zend\Form\Form as ZForm;

class SearchForm extends ZForm
{
    protected $searchField;
    protected $loc_id;
    protected $user_lat;
    protected $user_lon;
    protected $place_name;
    protected $submit;
    
    public function __construct($name = null, $options = array())
    {
       parent::__construct($name, $options);
    }

    public function init()
    {
       parent::init();

        $this->setName('search-form');  //using FQCN, not ideal
        $this->searchField = new Text("search");
        
        $this->loc_id = new Hidden("loc_id");
        $this->add($this->loc_id);
        
        $this->user_lat = new Hidden("user_lat");
        $this->add($this->user_lat);
             
        $this->user_lon = new Hidden("user_lon");
        $this->add($this->user_lon);
        
        $this->place_name = new Hidden("place_name");
        $this->add($this->place_name);

     //   $this->range = new Hidden("range");
     //   $this->add($this->range);
        
        //$this->searchField->setLabel(__CLASS__.' - search');
        $this->add($this->searchField);
        $this->submit = new Submit("searchSubmit");
        $this->submit->setValue("Suche");
        //make sure the submit button comes last in the form
        $this->add($this->submit, ['priority' => -10]);
    }
}

Zerion Mini Shell 1.0