src/Gzero/Cms/CMSSeeder.php
private function generateBodyHTML(Generator $faker)
    {
        $html                 = [];
        $imageCategories      = [
            'abstract',
            'animals',
            'business',
            'cats',
            'city',
            'food',
            'nightlife',
            'fashion',
            'people',
            'nature',
            'sports',
            'technics',
            'transport'
        ];
        $paragraphImageNumber = rand(0, 5);
        $headingNumber        = rand(0, 5);
        $imageUrl             = $faker->imageUrl(1140, 480, $imageCategories[array_rand($imageCategories)]);

        // random dumber of paragraphs
        for ($i = 0; $i < rand(5, 10); $i++) {
            $html[] = '<p>' . $faker->realText(rand(300, 1500)) . '</p>';
            // insert heading
            if ($i == $headingNumber) {
                $html[] = '<h3>' . $faker->realText(100) . '</h3>';
            }
            // insert image
            if ($i == $paragraphImageNumber) {
                $html[] = '<p><img src="' . $imageUrl . '" class="img-fluid"/></p>';
            }
        }
        return implode('', $html);
    }
private function generateBodyHTML(Generator $faker)
    {
        $html                 = [];
        $imageCategories      = [
            'abstract',
            'animals',
            'business',
            'cats',
            'city',
            'food',
            'nightlife',
            'fashion',
            'people',
            'nature',
            'sports',
            'technics',
            'transport'
        ];
        $paragraphImageNumber = rand(0, 5);
        $headingNumber        = rand(0, 5);
        $imageUrl             = $faker->imageUrl(1140, 480, $imageCategories[array_rand($imageCategories)]);

        // random dumber of paragraphs
        for ($i = 0; $i < rand(5, 10); $i++) {
            $html[] = '<p>' . $faker->realText(rand(300, 1500)) . '</p>';
            // insert heading
            if ($i == $headingNumber) {
                $html[] = '<h3>' . $faker->realText(100) . '</h3>';
            }
            // insert image
            if ($i == $paragraphImageNumber) {
                $html[] = '<p><img src="' . $imageUrl . '" class="img-fluid"/></p>';
            }
        }
        return implode('', $html);
    }
private function generateBodyHTML ( Generator $ faker ) { $ html = [ ] ; $ imageCategories = [ 'abstract' , 'animals' , 'business' , 'cats' , 'city' , 'food' , 'nightlife' , 'fashion' , 'people' , 'nature' , 'sports' , 'technics' , 'transport' ] ; $ paragraphImageNumber = rand ( 0 , 5 ) ; $ headingNumber = rand ( 0 , 5 ) ; $ imageUrl = $ faker -> imageUrl ( 1140 , 480 , $ imageCategories [ array_rand ( $ imageCategories ) ] ) ; // random dumber of paragraphs for ( $ i = 0 ; $ i < rand ( 5 , 10 ) ; $ i ++ ) { $ html [ ] = '<p>' . $ faker -> realText ( rand ( 300 , 1500 ) ) . '</p>' ; // insert heading if ( $ i == $ headingNumber ) { $ html [ ] = '<h3>' . $ faker -> realText ( 100 ) . '</h3>' ; } // insert image if ( $ i == $ paragraphImageNumber ) { $ html [ ] = '<p><img src="' . $ imageUrl . '" class="img-fluid"/></p>' ; } } return implode ( '' , $ html ) ; }
Function generates translation body HTML

@param Generator $faker Faker factory

@return string generated HTML
Function generates translation body HTML