Class CustomerGroupWriter

Class CustomerGroupWriter

CustomerGroupWriter implements CustomerGroupWriterInterface

Methods summary

public __construct( CI_DB_query_builder $queryBuilder, LanguageProvider $languageProvider )

CustomerGroupWriter constructor.

public store( CustomerGroupInterface $customerGroup ) :

Saves customer group entity data in database.

public update( CustomerGroupInterface $customerGroup ) :

Updates customer group entity data in database.

public createBase( IntType $customerGroupId, IntType $baseId ) : CustomerGroupWriter

Create base data from chosen personal offers table.

protected _setDefault( CustomerGroupInterface $customerGroup, $customerGroupId ) : CustomerGroupWriter

Updates the default customer group in the configuration data table.

protected _createPersonalOfferTable( $customerGroupId ) :

Creates an personal offer table with given id as suffix.

protected _dropPersonalOfferTableIfExists( $customerGroupId ) :

Drops personal offer table, if table with id exist.

protected _addGroupPermissionToProducts( $customerGroupId ) :

Add group permission id to products table.

protected _addGroupPermissionToCategories( $customerGroupId ) :

Add group permission id to categories table.

protected _columnNotExists( $column, $table ) : boolean

Check if given column exists in given table.

protected _createGroupPermissionColumn( $id, $table ) :

Creates an group_permission by id column in given table.

Properties summary

protected $queryBuilder : CI_DB_query_builder