Author: Adam Piotrowski (adam@wellcommerce.org)
Inheritance: extends WellCommerce\Bundle\DoctrineBundle\Entity\AbstractEntity, implements WellCommerce\Bundle\ThemeBundle\Entity\ThemeInterface, use trait Knp\DoctrineBehaviors\Model\Timestampable\Timestampable, use trait Knp\DoctrineBehaviors\Model\Blameable\Blameable
 public function create() : ThemeInterface
 {
     $theme = new Theme();
     $theme->setName('');
     $theme->setFolder('');
     return $theme;
 }
Beispiel #2
0
 /**
  * {@inheritDoc}
  */
 public function load(ObjectManager $manager)
 {
     $theme = new Theme();
     $theme->setName('WellCommerce Default Theme');
     $theme->setFolder('wellcommerce');
     $manager->persist($theme);
     $manager->flush();
     $this->setReference('theme', $theme);
 }
 /**
  * {@inheritDoc}
  */
 public function load(ObjectManager $manager)
 {
     if (!$this->isEnabled()) {
         return;
     }
     $theme = new Theme();
     $theme->setName('WellCommerce Default Theme');
     $theme->setFolder('wellcommerce-default-theme');
     $manager->persist($theme);
     $manager->flush();
     $this->setReference('theme', $theme);
 }
 /**
  * Returns theme working directory
  *
  * @return string
  */
 private function getDirectory()
 {
     return $this->getThemeDir($this->theme->getFolder());
 }
Beispiel #5
0
 /**
  * {@inheritdoc}
  */
 public function getCurrentThemeFolder()
 {
     return null === $this->theme ? $this->fallBackTheme : $this->theme->getFolder();
 }