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 | |
/** | |
* @see https://github.com/HosipLan/Nette-addDynamic | |
*/ | |
class CreatePresenter extends BasePresenter | |
{ | |
protected function startup() | |
{ |
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 | |
public function templatePrepareFilters($template) { | |
$template->registerFilter($latte = new Nette\Templates\LatteFilter()); | |
TwigMacro::register($latte->getHandler()); | |
} |
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 | |
use Doctrine\ORM\Query\Expr\Join; | |
class OfferFinder extends Blabla | |
{ | |
public function whereTags(array $tags) | |
{ |
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 | |
// new movie | |
$movie = new Entities\Movie; | |
$movie->name = 'Pulp Fiction'; | |
// new director | |
$movie->director = new Entities\Director; | |
$movie->director->name = 'Quentin Tarantino'; |
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 | |
namespace NetteExtras\Forms; | |
class ChangeTracker extends \Nette\Forms\HiddenField | |
{ | |
private $session; | |
private $modifiedValues; |
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 | |
namespace Nette\Templates; | |
use Nette\Forms\Form; | |
use Nette\String; | |
/** | |
* Form macros | |
* |
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
{ | |
"methodCalls": [ | |
{ | |
"class": "\\Mockery", | |
"method": "mock", | |
"position": 0, | |
"mask": "%s|\\Mockery\\MockInterface" | |
}, | |
{ | |
"class": "\\Nette\\DI\\Container", |
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
import Kefir from 'kefir'; | |
import {List, Stack} from 'immutable'; | |
import {comp, filter, map} from 'transducers-js'; | |
function register(stream, messageType, handler) { | |
let xform = comp( | |
filter(x => x.first() === messageType), | |
map(x => x.rest())); | |
stream.transduce(xform).onValue(handler); | |
} |
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 __DIR__ . '/../vendor/autoload.php'; | |
$configurator = new Nette\Configurator; | |
$configurator->setDebugMode(TRUE); // debug mode MUST NOT be enabled on production server | |
$configurator->enableDebugger(__DIR__ . '/../log'); | |
$configurator->setTempDirectory(__DIR__ . '/../temp'); |
NewerOlder