randomDepartment example


    private function createCategory(DemodataContext $context, array $pageIds, array $tags, string $parentId, ?string $afterId, int $max, int $current): array
    {
        $id = Uuid::randomHex();

        $cat = [
            'id' => $id,
            'parentId' => $parentId,
            'afterCategoryId' => $afterId,
            'name' => $this->randomDepartment($context->getFaker()),
            'active' => true,
            'cmsPageId' => $context->getFaker()->randomElement($pageIds),
            'mediaId' => $context->getRandomId('media'),
            'description' => $context->getFaker()->text(),
            'tags' => $this->getTags($tags),
        ];

        if ($current >= $max) {
            return $cat;
        }

        
Home | Imprint | This part of the site doesn't use cookies.