protected function generateSeo(CmsModel\SeoSubjectInterface $subject)
    {
        $seo = $this->seoRepository->createNew();
        if (0 < strlen($name = $this->objectToString($subject))) {
            $seo
                ->setTitle($name . ' seo title')
                ->setDescription($name . ' seo description');
        } else {
            $seo
                ->setTitle($this->faker->sentence(rand(3, 6)))
                ->setDescription($this->faker->words(rand(3, 6)));
        }
        $subject->setSeo($seo);
    }
protected function generateSeo(CmsModel\SeoSubjectInterface $subject)
    {
        $seo = $this->seoRepository->createNew();
        if (0 < strlen($name = $this->objectToString($subject))) {
            $seo
                ->setTitle($name . ' seo title')
                ->setDescription($name . ' seo description');
        } else {
            $seo
                ->setTitle($this->faker->sentence(rand(3, 6)))
                ->setDescription($this->faker->words(rand(3, 6)));
        }
        $subject->setSeo($seo);
    }
protected function generateSeo ( CmsModel \ SeoSubjectInterface $ subject ) { $ seo = $ this -> seoRepository -> createNew ( ) ; if ( 0 < strlen ( $ name = $ this -> objectToString ( $ subject ) ) ) { $ seo -> setTitle ( $ name . ' seo title' ) -> setDescription ( $ name . ' seo description' ) ; } else { $ seo -> setTitle ( $ this -> faker -> sentence ( rand ( 3 , 6 ) ) ) -> setDescription ( $ this -> faker -> words ( rand ( 3 , 6 ) ) ) ; } $ subject -> setSeo ( $ seo ) ; }
Generates seo to the given subject.

@param CmsModel\SeoSubjectInterface $subject
Generates seo to the given subject .