Example #1
0
 /**
  * render the view
  *
  * @param string $table name of the table
  *
  * @since 3.0.0
  *
  * @return string
  */
 public function render($table = null)
 {
     $output = Hook::trigger('searchFormStart');
     /* html elements */
     $formElement = new Html\Form($this->_registry, $this->_language);
     $formElement->init(['form' => ['class' => 'rs-js-validate-search rs-form-search'], 'button' => ['submit' => ['class' => 'rs-button-search', 'name' => get_class()]]]);
     /* create the form */
     $formElement->search(['name' => 'search', 'placeholder' => $this->_language->get('search'), 'tabindex' => '1'])->hidden(['name' => 'table', 'value' => $table])->token()->submit($this->_language->get('search'));
     /* collect output */
     $output .= $formElement;
     $output .= Hook::trigger('searchFormEnd');
     return $output;
 }