ibrows / boxalino-bundle
v1.0.3
2016-09-20 13:47 UTC
Requires
- php: >=5.3.3
- doctrine/dbal: <=2.5
- doctrine/doctrine-bundle: ~1.4
- doctrine/orm: <=2.5
- symfony/symfony: 2.8.*
- ychadwick/boxalino-client-sdk-php: ^1.0
Requires (Dev)
- doctrine/doctrine-fixtures-bundle: v2.2.0
- phpunit/phpunit: ^4.0
This package is not auto-updated.
Last update: 2024-09-16 00:56:07 UTC
README
IbrowsBoxalinoBundle 允许您将实体和选择的实体字段导出到 boxalino,提供由 boxalino 提供的搜索和自动完成功能的服务,以及 JavaScript 跟踪的 twig 扩展。
安装和设置捆绑包
-
获取源代码
$ php composer.phar require ibrows/boxalino-bundle
Composer 会将捆绑包安装到您的项目的
ibrows/boxalino-bundle
目录。 -
将捆绑包添加到您的
AppKernel
类// app/AppKernerl.php public function registerBundles() { $bundles = array( // ... new Ibrows\BoxalinoBundle\IbrowsBoxalinoBundle(), // ... ); // ... }
配置
设置凭证、路径和实体
ibrows_boxalino: db_driver: "orm" #Default value #used to extract translatable data from an entity translation_locales: [en] #Default value #boxalino credentials access: account: "account" username: "username" password: "somepassword" #Export directories and export logger export: directory: "%kernel.cache_dir%/boxalino/" #Default value, Where to store the export zip and csv files properties_xml: "%kernel.root_dir%/config/properties.xml" #Which properties.xml file to use log_manager: "ibrows_boxalino.entity.export_log_manager" #Default value, implement you own to log to another system #Entity setup entities: product: class: "AppBundle\\Entity\\Product" entity_mapper: "ibrows_boxalino.mapper_orm.entity_mapper" #Default value, implement you own to log to create entity maps entity_provider: "ibrows_boxalino.provider_orm.entity_provider" #Default value, implement you own to retrieve entities delta_provider: "ibrows_boxalino.provider_orm.delta_provider" #Default value, implement you own to provide updated entities #configuration for retrieving delta data delta: strategy: fromFullData #Default value, possible values are 'fromFullData', 'timestambleFieldQuery','repositoryMethod' strategy_options: #If strategy is timestambleFieldQuery, or repositoryMethod, one of the following must be supplied timestampable_query_field: updated_at #Field to use if timestableFieldQuery is strategy repository_method: getDeltaEntities #The name of the method on the Entity Repository class to retrieve delta entities, must take a \DateTime object as a parameter #List of fields to export, generally the accessor on the entity. Field name in CSV, and then accessor fields: id: id name: name description: description brand: brand my_array_field: "[my_array_field]" can also be in array syntax if data is array not an objetct brand: class: "AppBundle\\Entity\\Brand" fields: id: id name: name productCategory: class: "AppBundle\\Entity\\ProductCategory" fields: id: id parent: parent name: name
更多信息请参阅 index