surda/search

Search control for Nette Framework

v1.4.0 2023-01-04 10:52 UTC

This package is auto-updated.

Last update: 2024-11-04 15:00:31 UTC


README

Build Status Licence Latest stable PHPStan

Installation

The recommended way to is via Composer:

composer require surda/search

After that you have to register extension in config.neon:

extensions:
    search: Surda\Search\DI\SearchExtension

Configuration

Default

search:
    templates:
        default: bootstrap4.default.latte
    autocomplete: 'on'

Usage

Presenter

use Nette\Application\UI\Presenter;
use Surda\Search\TSearch;

class ProductPresenter extends Presenter
{
    use TSearch;
    
    public function actionDefault(): void
    {
        $text = $this->search;
        ... 
    }
}

Template

{control search}