public function generateSlideShows()
    {
        foreach ($this->names as $tag => $name) {
            $this->output->write(sprintf(
                '- <comment>%s</comment> %s ',
                $name,
                str_pad('.', 44 - mb_strlen($name), '.', STR_PAD_LEFT)
            ));

            if (null !== $slideShow = $this->findSlideShowByTag($tag)) {
                $this->output->writeln('already exists.');
                continue;
            }

            /** @var \Ekyna\Bundle\CmsBundle\Entity\SlideShow $slideShow */
            $slideShow = $this->repository->createNew();
            $slideShow
                ->setName($name)
                ->setTag($tag);

            $this->operator->persist($slideShow);

            $this->output->writeln('created.');
        }
    }
public function generateSlideShows()
    {
        foreach ($this->names as $tag => $name) {
            $this->output->write(sprintf(
                '- <comment>%s</comment> %s ',
                $name,
                str_pad('.', 44 - mb_strlen($name), '.', STR_PAD_LEFT)
            ));

            if (null !== $slideShow = $this->findSlideShowByTag($tag)) {
                $this->output->writeln('already exists.');
                continue;
            }

            /** @var \Ekyna\Bundle\CmsBundle\Entity\SlideShow $slideShow */
            $slideShow = $this->repository->createNew();
            $slideShow
                ->setName($name)
                ->setTag($tag);

            $this->operator->persist($slideShow);

            $this->output->writeln('created.');
        }
    }
public function generateSlideShows ( ) { foreach ( $ this -> names as $ tag => $ name ) { $ this -> output -> write ( sprintf ( '- <comment>%s</comment> %s ' , $ name , str_pad ( '.' , 44 - mb_strlen ( $ name ) , '.' , STR_PAD_LEFT ) ) ) ; if ( null !== $ slideShow = $ this -> findSlideShowByTag ( $ tag ) ) { $ this -> output -> writeln ( 'already exists.' ) ; continue ; } /** @var \Ekyna\Bundle\CmsBundle\Entity\SlideShow $slideShow */ $ slideShow = $ this -> repository -> createNew ( ) ; $ slideShow -> setName ( $ name ) -> setTag ( $ tag ) ; $ this -> operator -> persist ( $ slideShow ) ; $ this -> output -> writeln ( 'created.' ) ; } }
Generates the slide shows based on configuration.
Generates the slide shows based on configuration .