func() public method

Add a function to our Twig environment
public func ( string $name, callable $func = null, array $is_safe = ['html'] ) : self
$name string - Name to access in Twig
$func callable - function definition
$is_safe array
return self
Esempio n. 1
0
 /**
  * Add a function to the lens
  *
  * @param string $name
  * @param callable $func
  */
 protected function addLensFunction(string $name, callable $func)
 {
     $this->airship_lens_object->func($name, $func);
 }