Skip to content

Commit

Permalink
Template: added addFunction() for Latte 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jan 5, 2020
1 parent 81343d5 commit aa975f0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Bridges/ApplicationLatte/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,17 @@ public function addFilter(?string $name, callable $callback)
}


/**
* Registers run-time function.
* @return static
*/
public function addFunction(string $name, callable $callback)
{
$this->latte->addFunction($name, $callback);
return $this;
}


/**
* Sets translate adapter.
* @return static
Expand Down

0 comments on commit aa975f0

Please sign in to comment.