public function create(GroupModel $group)
 {
     $stat = $this->siteContainer['databasehelper']->getPDO()->prepare("INSERT INTO group_information " . "(slug, title, description, url )" . " VALUES " . "(:slug, :title,  :description, :url)");
     $stat->execute(array('slug' => $group->getSlug(), 'title' => $group->getTitle(), 'description' => $group->getDescription(), 'url' => $group->getUrl()));
     $group->setId($this->siteContainer['databasehelper']->getPDO()->lastInsertId());
 }
 public function addGroup(GroupModel $group)
 {
     if (!$group->getSlug()) {
         $this->warnings[] = new DataWarningGroupHasNoSlug();
         $group->createSlug();
     }
     if ($this->siteContainer['grouprepository']->loadBySlug($group->getSlug())) {
         $this->errors[] = new DataErrorTwoGroupsHaveSameSlugs();
     }
     $this->siteContainer['log']->info("Adding group", array('group' => $group->getDataForLoggerInfo()));
     $this->siteContainer['grouprepository']->create($group);
 }