Beispiel #1
0
 public function update_sitename()
 {
     if ($this->token->validate("update_sitename")) {
         if ($this->isPost()) {
             $this->site->setSiteName($this->request->request->get('SITE'));
             $this->entityManager->persist($this->site);
             $this->entityManager->flush();
             $attributes = SiteKey::getList();
             foreach ($attributes as $ak) {
                 $controller = $ak->getController();
                 $value = $controller->createAttributeValueFromRequest();
                 $this->site->setAttribute($ak, $value);
             }
             $this->redirect('/dashboard/system/basics/name', 'sitename_saved');
         }
     } else {
         $this->set('error', array($this->token->getErrorMessage()));
     }
 }