This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once(Application::MODELS . 'Menu.php'); | |
/** | |
* Návrhový vzor Singleton => může existovat pouze jedna jediná instance. | |
*/ | |
class Application{ | |
private static $instance = false; | |
const APP = WEB_ROOT . 'app/'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Happy birthday Tom | |
class Tom extends Person{ | |
public function runBirthday(){ | |
$this->age++; | |
if($this->age == 18){ | |
$this->acl->allow('doing own decisions'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class CathegoryPresenter extends BasePresenter{ | |
protected function createComponentCathegoryForm() { | |
if ($this->params['id'] && $this->params['view'] == "edit") { | |
$values = $this->context->model->getCathegories(0, true)->where("id", $this->params['id'])->fetch()->toArray(); | |
} else { | |
$values = array("id" => 0, "alias" => "", "name" => "", "root_id" => 0, "description" => "", "key_words" => "", "alt_names" => ""); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Live Form Validation for Nette 2.0 | |
* | |
* @author Radek Ježdík, David Grudl | |
* @license New BSD License | |
*/ | |
var LiveForm = { | |
options: { | |
controlErrorClass: 'form-control-error', |