2017 © Pedro Peláez
 

symfony-bundle brander-eav

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

image

tomfun/brander-eav

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  • Friday, May 12, 2017
  • by tomfun1990@gmail.com
  • Repository
  • 1 Watchers
  • 2 Stars
  • 611 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 25 Versions
  • 0 % Grown

The README.md

How it work, what is it

read in russian, (*1)

Install bundle

composer require tomfun/brander-eav
// app/AppKernel.php
    public function registerBundles()
    // ...
        new \Brander\Bundle\EAVBundle\BranderEAVBundle(),
        new FOS\ElasticaBundle\FOSElasticaBundle(),
        new JMS\AopBundle\JMSAopBundle(),
        new JMS\SerializerBundle\JMSSerializerBundle(), // optional
        new JMS\DiExtraBundle\JMSDiExtraBundle($this),

    // ...
# app/config/parameters.yml
# same add to app/config/parameters.yml.dist
parameters:
# .........
    locale: ru

just enable elastica bundle and add base configuration, (*2)

#app/config/config.yml
fos_elastica:
    clients:
        default: { host: localhost, port: 9200 }
    indexes:
        app: ~

Requirements

  • FOSElasticaBundle()
  • JMSAopBundle()
  • JMSDiExtraBundle($this)
  • JS router with generate function
  • Twigjs filters (for listing frontend)
    • trans
    • transchoice
  • Compatible gulp task with twigjs compilation

Configuration

First at all

  • you must have entity you want to search
  • query php class
  • search result class

Config example

brander_eav:
  fixturesDirectory: /home/tomfun/fixtures-data
  useJmsSerializer: false #turn off standard elastica serializer for known entity
  list_class_map:
    - Sdelka\Bundle\AdvertBundle\Entity\Advert #entity with eav values, auto find query and result classes in model dir

this expanded as:, (*3)

brander_eav:
  useJmsSerializer: false #turn off standard elastica serializer for known entity
  list_class_map:
    - 
      entity: Sdelka\Bundle\AdvertBundle\Entity\Advert #orm entity
      query: Sdelka\Bundle\AdvertBundle\Model\AdvertQuery #query class. must exist.
      result: Sdelka\Bundle\AdvertBundle\Model\AdvertQuery #result class. must exist.
      serviceClass: Brander\Bundle\EAVBundle\Service\Elastica\EavList #service class

also you must implement some interfaces (e.g. SearchableEntityInterface). name of listing service in this case: "brander_eav.elastica.list.sdelka_advert.advert", (*4)

if you don't need auto configuration of elastica bundle, you can use simple serialize directive (searchable) and configure elastic search bundle manually:, (*5)

brander_eav:
  useJmsSerializer: false #turn off standard elastica serializer for known entity
  searchable:
    - Sdelka\Bundle\AdvertBundle\Entity\Advert #orm entity

show auto-generated lists (inner elastica index name / type name):

app/console de:cont | grep "brander_eav.elastica.list"

Routing

in app/config/routing.yml add this lines:, (*6)

# app/config/routing.yml
eav:
  resource: "@BranderEAVBundle/Resources/config/routing.yml"
  options:
    i18n: false
    expose: true

default admin url is /admin/eav/manage/, (*7)

Security

if you want grant access for admin part for non admin (example: manager), (*8)

brander_eav:
  useJmsSerializer: false #turn off standard elastica serializer for known entity
  manageRole: ROLE_MANAGER

or for anonymous: manageRole: "anon." or rewrite voter service: brander_eav.security.universal_voter., (*9)

also look into ElasticaSkeletonBundle, (*10)

todo: * vendor/werkint/stats-bundle/src/Service/Security/Voter/StatsVoter.php supportsAttribute * backbone.modelbinder -> stickit, (*11)

wtf: cache.app voter Twig\BranderEAVExtension \Brander\Bundle\EAVBundle\DependencyInjection\BranderEAVExtension::getConfiguration, (*12)

The Versions

12/05 2017

dev-master

9999999-dev

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

12/05 2017

v1.2.2

1.2.2.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

10/04 2017

v1.2.1

1.2.1.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

10/04 2017

v1.2.0

1.2.0.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

20/02 2017

v1.1.5

1.1.5.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

02/02 2017

v1.1.4

1.1.4.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

11/01 2017

v1.1.3

1.1.3.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

26/12 2016

v1.1.2

1.1.2.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

05/12 2016

v1.1.1

1.1.1.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

18/11 2016

v1.1.0

1.1.0.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

08/11 2016

v1.0.8

1.0.8.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

24/10 2016

v1.0.7

1.0.7.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

10/10 2016

v1.0.6

1.0.6.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

07/10 2016

v1.0.5

1.0.5.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

04/10 2016

v1.0.4

1.0.4.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

30/09 2016

v1.0.3

1.0.3.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

29/09 2016

v1.0.2

1.0.2.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

24/08 2016

dev-refactoring

dev-refactoring

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

24/08 2016

v1.0.1

1.0.1.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

23/08 2016

v1.0.0

1.0.0.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

06/01 2016

v0.0.7

0.0.7.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

22/08 2015

v0.0.6

0.0.6.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

21/08 2015

0.0.5

0.0.5.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

21/08 2015

v0.0.4

0.0.4.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value

18/08 2015

v0.0.3

0.0.3.0

helps to create entity that have different attributes (fields) in same database. Also provide integration with elastic search friendsofsymfony/elastica-bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bogdan Yurov
by Vladimir Odesskij
by Grigory Kotov

search elasticsearch elastica eav entity attribute value