get('doctrine'); $dummy = function () { // Dummy function for compiler argument of ExpressionFunction. }; parent::__construct(null, [ new EntityGetterProvider($doctrine->getManager()), ]); // Add 'now' function which return current date. $this->addFunction(new ExpressionFunction('now', $dummy, function () { return date_create(); })); } }