Beispiel #1
0
 protected function setSetting($id, $value)
 {
     $setting = $this->getSetting($id);
     if ($setting instanceof Setting) {
         $setting->setValue($value);
     } else {
         $setting = new Setting();
         $setting->setId($id);
         $setting->setValue($value);
         $setting->setSite($this->site);
         $this->getEntityManager()->persist($setting);
     }
     $this->getEntityManager()->flush();
 }
 /**
  * {@inheritDoc}
  */
 public function getResourceId()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getResourceId', array());
     return parent::getResourceId();
 }