コード例 #1
0
 /**
  * Returns a text element for autosearch. Can be overruled.
  *
  * The form / html elements to search on. Elements can be grouped by inserting null's between them.
  * That creates a distinct group of elements
  *
  * @param \MUtil_Model_ModelAbstract $model
  * @param array $data The $form field values (can be usefull, but no need to set them)
  * @return array Of \Zend_Form_Element's or static tekst to add to the html or null for group breaks.
  */
 protected function getAutoSearchElements(\MUtil_Model_ModelAbstract $model, array $data)
 {
     if ($model->hasTextSearchFilter()) {
         // Search text
         $element = $this->form->createElement('text', \MUtil_Model::TEXT_FILTER, array('label' => $this->_('Free search text'), 'size' => 20, 'maxlength' => 30));
         return array($element);
     }
 }