Exemplo n.º 1
0
 /**
  * Removes pair by key.
  *
  * @param string $key
  */
 public function remove($key)
 {
     $pair = $this->repository->find($key);
     if ($pair !== null) {
         $this->repository->remove($pair->getId());
         $this->manager->flush();
         $this->manager->refresh();
     }
 }
Exemplo n.º 2
0
 /**
  * Removes a setting.
  *
  * @param Setting $setting
  */
 public function remove(Setting $setting)
 {
     $this->repo->remove($setting->getId());
     $this->manager->flush();
     $this->manager->refresh();
     $this->eventDispatcher->dispatch('ongr_settings.setting_change', new SettingChangeEvent('delete'));
 }