2017 © Pedro Peláez
 

typo3-flow-package visualsearch

package to handle advanced facetted searches

image

kaystrobach/visualsearch

package to handle advanced facetted searches

  • Thursday, June 28, 2018
  • by kaystrobach
  • Repository
  • 2 Watchers
  • 5 Stars
  • 2,058 Installations
  • JavaScript
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 3 Open issues
  • 7 Versions
  • 5 % Grown

The README.md

FLOW.VisualSearch

StyleCI Codacy Badge, (*1)

This package provides a powerful search component for Flow ecosystem. Any search repository can be made searchable by extending SearchableRepository and providing an appropriate configuration. The front-end component is provided as a Fluid partial., (*2)

Demo, (*3)

Installation

composer require kaystrobach/visualsearch:^3.0.0

Usage

To make a repository searchable, extend SearchableRepository or implement the SearchableRepositoryInterface. Note that the defaultSearchName property should set to the name of the corresponding search configuration., (*4)

<?php

namespace Poke\Search\Domain\Repository;

use Neos\Flow\Annotations as Flow;
use Neos\Flow\Persistence\Repository;

use KayStrobach\VisualSearch\Domain\Repository\SearchableRepository;

/**
 * @Flow\Scope("singleton")
 */
class PokemonRepository extends SearchableRepository
{
    /**
     * @var string
     */
    protected $defaultSearchName = 'pokemon';

    public function findByName(string $name)
    {
        ...
    }
}

The repository can now be queried using the findByDefaultQuery method, e.g., from inside a controller action., (*5)

public function indexAction() {
    $this->view->assign('pokemon', $this->pokemonRepository->findByDefaultQuery());
}

To actually display the search component, include the search partial in your template., (*6)

<f:render partial="Visualsearch/Search" arguments="{searchName:'pokemon', pokemon:pokemon}" contentAs="value">
    ...
</f:render>

Configuration

Search configurations are defined in the Configuration/VisualSearch.yaml file. Please see the demo package for an example configuration., (*7)

Theming

The search component can be styled using the following CSS properties:, (*8)

Custom Property Default
--visual-search-background-color white
--visual-search-color black
--visual-search-background-color-focus lightgray
--visual-search-color-focus black
--visual-search-facet-background-color lightgray
--visual-search-facet-color black

Development

Install front-end dependencies via npm., (*9)

cd Resources/Private/App
npm install

After making changes to the front-end code, run the build script to bundle the assets., (*10)

npm run build

Linters are available for both JavaScript and CSS templates., (*11)

npm run lint:js
npm run lint:css

License

This project is licensed under the MIT License., (*12)

The Versions

28/06 2018

dev-master

9999999-dev

package to handle advanced facetted searches

  Sources   Download

The Requires

 

28/06 2018

1.0.0

1.0.0.0

package to handle advanced facetted searches

  Sources   Download

The Requires

 

04/09 2017

0.5.0

0.5.0.0

package to handle advanced facetted searches

  Sources   Download

The Requires

 

04/09 2017

0.5.x-dev

0.5.9999999.9999999-dev

package to handle advanced facetted searches

  Sources   Download

The Requires

 

18/05 2016

0.4.1

0.4.1.0

package to handle advanced facetted searches

  Sources   Download

The Requires

 

12/01 2016

0.4.0

0.4.0.0

package to handle advanced facetted searches

  Sources   Download

The Requires

 

11/11 2015

dev-newlogic

dev-newlogic

package to handle advanced facetted searches

  Sources   Download

The Requires