private function addDemoContentOperations() {
    $operations = [];

    $contentDefs = $this->demoContentManager->getFilteredDefinitions(
      DemoContentTypes::ECOMMERCE
    );

    // Add module install task to install our commerce exports module.
    $operations[] = [
      [static::class, 'installDependency'],
      [
        'presto_commerce',
        DependencyTypes::MODULE,
      ],
    ];

    // Run any further content tasks.
    foreach ($contentDefs as $def) {
      $operations[] = [
        [static::class, 'createDemoContent'],
        [$def['id']],
      ];
    }

    return $operations;
  }
private function addDemoContentOperations() {
    $operations = [];

    $contentDefs = $this->demoContentManager->getFilteredDefinitions(
      DemoContentTypes::ECOMMERCE
    );

    // Add module install task to install our commerce exports module.
    $operations[] = [
      [static::class, 'installDependency'],
      [
        'presto_commerce',
        DependencyTypes::MODULE,
      ],
    ];

    // Run any further content tasks.
    foreach ($contentDefs as $def) {
      $operations[] = [
        [static::class, 'createDemoContent'],
        [$def['id']],
      ];
    }

    return $operations;
  }
private function addDemoContentOperations ( ) { $ operations = [ ] ; $ contentDefs = $ this -> demoContentManager -> getFilteredDefinitions ( DemoContentTypes :: ECOMMERCE ) ; // Add module install task to install our commerce exports module. $ operations [ ] = [ [ static :: class , 'installDependency' ] , [ 'presto_commerce' , DependencyTypes :: MODULE , ] , ] ; // Run any further content tasks. foreach ( $ contentDefs as $ def ) { $ operations [ ] = [ [ static :: class , 'createDemoContent' ] , [ $ def [ 'id' ] ] , ] ; } return $ operations ; }
Crates a set of batch operations to create demo content.

@return array
A set of Drupal batch operations.
Crates a set of batch operations to create demo content .