phpfunctions
by Oleg Levin


Description

Some php functions to twig filters and functions:

usage:

functions
{{ array_rand(array, numitems) }} - select random numitems from array
{{ str_replace(search, replace, subject) }} replaces search whith replace in subject
{{ filesize(file) }} returns filesize
{{ videoinfo(videolink) }} returns preview image from youtube videolink
{{ pdfpre(pdffilename, width, height) }} returns image with pdf preview of 1st page (thanks to pdfPreview by blockmurder for Bolt 2)
{{ calendar(month, year, day) }} returns calendar table, today by default
{{ server(param) }} same as $_SERVER[param]

filters
{{ array|suffle }} randomizing array
{{ string|url_decode }} decode sting from url to normal format


More Info

Created
19th Sep 2016
Latest Version(s)
Last Update
  • 27th December 2017 (Release)
  • 27th December 2017 (Development)
Category
Plugin
License

Changelog & Releases

Loading releases …

Related