These are chat archives for ppi/framework

5th
Apr 2016
Ross Moroney
@code-ph0y
Apr 05 2016 08:54
hey guys is there a way to create small chunks of function in your templates?
for example in joomla its called modules
... i have been looking into symfony template helpers
Vítor Brandão
@noisebleed
Apr 05 2016 08:54
depends on the templating engine used
Ross Moroney
@code-ph0y
Apr 05 2016 08:54
just php
... but i don't know if symfony template helper would be the right approach?
Roman Tsiupa
@dracony
Apr 05 2016 08:56
wellcome to the wonderfull workld of pure PHP templating with PHPixie template =P
you can also have helper if you like
but you can also use any PHP )
Ross Moroney
@code-ph0y
Apr 05 2016 08:57
yeah just looking for the best approach :P
i will look up PHPixie
Roman Tsiupa
@dracony
Apr 05 2016 08:59
you dont need the entire framework
Ross Moroney
@code-ph0y
Apr 05 2016 08:59
yeah
Ross Moroney
@code-ph0y
Apr 05 2016 08:59
just wanna see what your doing with it ;)
ohhhh the extensions!
is exactly what i need
Roman Tsiupa
@dracony
Apr 05 2016 09:01
you can run the examples:
git clone https://github.com/phpixie/template
cd template/examples
composer install
php quickstart.php
Ross Moroney
@code-ph0y
Apr 05 2016 09:02
thanks man!
if you need some help down the line
Ross Moroney
@code-ph0y
Apr 05 2016 09:16
thanks i will that's me joined the room
Roman Tsiupa
@dracony
Apr 05 2016 09:16
cool =)
Paul Dragoonis
@dragoonis
Apr 05 2016 09:48
@code-ph0y for raw PHP you gave ViewHelpers. For twig you have Extensions. For Smarty you have Plugins. Pick one. They're all supported in your PPI app
Ross Moroney
@code-ph0y
Apr 05 2016 09:49
hey bud hows it going?
ViewHelper you mean TemplateHelper?
$view['calendar']->createCalendar();
function getName() { return 'calendar'; }
like so?
Paul Dragoonis
@dragoonis
Apr 05 2016 09:52
That's right!
Ross Moroney
@code-ph0y
Apr 05 2016 09:53
amazing ... i love the command line functionality now mate!
Paul Dragoonis
@dragoonis
Apr 05 2016 10:09
Which comand ?
Ross Moroney
@code-ph0y
Apr 05 2016 10:09
in the modules?
you can create your own now
Paul Dragoonis
@dragoonis
Apr 05 2016 10:10
Cool
Autoloaded commands ? :)
Ross Moroney
@code-ph0y
Apr 05 2016 10:15
yeah man that's great! lol