PHP Class Shopware\DataGenerator\Resources\Categories

Inheritance: extends Shopware\DataGenerator\Resources\BaseResource
Show file Open project: shopwarelabs/sw-cli-tools

Public Properties

Property Type Description
$categoriesFlat The array with the categories that are going to be created

Protected Properties

Property Type Description
$categoriesSum The number of categories which have been created Used in order to not create too many categories
$tables array
$total

Public Methods

Method Description
create ( Shopware\DataGenerator\Writer\WriterInterface $writer )
getUniqueId ( $type )

Private Methods

Method Description
buildNestedTree ( integer $number, integer | null $parentCategory = null, integer $depth, array | null $leftNeighbour = null ) : array
buildPath ( $id ) : array Builds path for the given category

Method Details

create() public method

public create ( Shopware\DataGenerator\Writer\WriterInterface $writer )
$writer Shopware\DataGenerator\Writer\WriterInterface

getUniqueId() public method

public getUniqueId ( $type )

Property Details

$categoriesFlat public property

The array with the categories that are going to be created
public $categoriesFlat

$categoriesSum protected property

The number of categories which have been created Used in order to not create too many categories
protected $categoriesSum

$tables protected property

protected array $tables
return array

$total protected property

protected $total