factory_lollipop-1.0.x-dev/tests/modules/factory_lollipop_test/src/Factories/VocabularyFactory.php

tests/modules/factory_lollipop_test/src/Factories/VocabularyFactory.php
<?php

namespace Drupal\factory_lollipop_test\Factories;

use Drupal\factory_lollipop\FactoryInterface;
use Drupal\factory_lollipop\FixtureFactory;

/**
 * Creates Drupal Vocabulary for use in tests.
 */
class VocabularyFactory implements FactoryInterface {

  /**
   * {@inheritdoc}
   */
  public function getName():string {
    return 'vocabulary';
  }

  /**
   * {@inheritdoc}
   */
  public function resolve(FixtureFactory $lollipop): void {
    $lollipop->define('vocabulary', 'vocabulary_tags', [
      'vid' => 'tags',
    ]);

    $lollipop->define('vocabulary', 'vocabulary_categories', []);
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc