示例#1
0
 /**
  * @param \Nette\Application\UI\Form $form
  */
 private function checkUsername(Form $form)
 {
     $username = $form['base']['username']->getValue();
     $user = $this->userFilter->filterUsername($this->userFacade->all(), $username)->fetch();
     if (!$user) {
         return;
     }
     if (!($user->id == $this->id)) {
         $form->addError('Zadaný login již existuje, zadejte prosím jiný');
     }
 }
 /**
  * @param $id
  * @return array
  */
 protected function getSections($id)
 {
     $selection = $this->userFilter->filterId($this->userFacade->all(), $id);
     $selection->select(':user_has_section.section.id');
     return $selection->fetchPairs('id', 'id');
 }
示例#3
0
 /**
  * @return \Nette\Database\Table\Selection
  */
 private function getModel()
 {
     return $this->userFacade->all();
 }
 /**
  * @return \Nette\Database\Table\Selection
  */
 public function all()
 {
     return $this->userFacade->all();
 }