/** * @param \DB\ServerRepository $serverRepository * @param ServerCommander $serverCommander * @param \Nette\Security\User $user */ public function __construct($serverRepository, $serverCommander, $user = NULL) { parent::__construct(); $this->serverRepo = $serverRepository; $this->serverCmd = $serverCommander; $this->user = $user; }
/** * @param string $filePath * @param FileModel $fileModel * @param bool $allowedToEdit * @param array $unchangeableLines format: array('patern'=>'replacement', 'patern'=>'replacement'); passed to preg_replace */ public function __construct($filePath, $fileModel, $allowedToEdit, $unchangeableLines = array()) { parent::__construct(); $this->filePath = $filePath; $this->fileModel = $fileModel; $this->allowedToEdit = $allowedToEdit; $this->unchangeableLines = $unchangeableLines; }
/** * @param Nette\Http\SessionSection $session * @param Nette\ComponentModel\IContainer|null $parent * @param null $name */ public function __construct(\Nette\Http\SessionSection $session, $parent = NULL, $name = NULL) { parent::__construct($parent, $name); $this->session = $session; $this->question = Html::el('p')->addAttributes(array('class' => "{$this->cssClass}--question")); $this->form = new Form($this, 'form'); $this->form->getElementPrototype()->class = "{$this->cssClass}--form"; $this->form->getRenderer()->wrappers['controls']['container'] = NULL; $this->form->addHidden('token'); $this->form->addSubmit('yes', self::$_strings['yes'])->onClick[] = array($this, 'confirmClicked'); $this->form->addSubmit('no', self::$_strings['no'])->onClick[] = array($this, 'cancelClicked'); $this->form['yes']->getControlPrototype()->class = 'btn'; $this->form['no']->getControlPrototype()->class = 'btn'; }
/** * @param GameUpdateModel $gameUpdater * @param string $path */ public function __construct($gameUpdater, $path) { parent::__construct(); $this->gameUpdater = $gameUpdater; $this->path = $path; }