assign_vars() or assign_block_vars()

Discuss the development of future releases of phpBB (phpBB 3.x minor releases) and MODing/Coding related questions.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
User avatar
TheNick
New member
New member
Posts: 10
Joined: 06 Jul 2009, 18:51
Real name: Niklas
Location: Toenisvorst, Germany
Contact:

assign_vars() or assign_block_vars()

Postby TheNick » 01 Aug 2009, 19:34

Hey,
I'd like to create my first own MOD, but I need some assistance in this basic question:
What's the difference between assign_vars() and assign_block_vars(). This two methods are required (ok, not really, they're but useful) in phpBB-based pages.
I just noticed, that assign_block_vars is used for arrays, while assign_vars is used for variables.

Is that the only difference?

Greets,
Niklas
PM me for MOD-translations into German
- CTO Elektrotipps.de

User avatar
onehundredandtwo
Past Contributor
Past Contributor
Posts: 48
Joined: 23 Jul 2009, 19:47
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: assign_vars() or assign_block_vars()

Postby onehundredandtwo » 01 Aug 2009, 21:54


User avatar
TheNick
New member
New member
Posts: 10
Joined: 06 Jul 2009, 18:51
Real name: Niklas
Location: Toenisvorst, Germany
Contact:

Re: assign_vars() or assign_block_vars()

Postby TheNick » 01 Aug 2009, 22:02

Ah, I see. Thank you!

Ciao,
Niklas
PM me for MOD-translations into German
- CTO Elektrotipps.de

User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: assign_vars() or assign_block_vars()

Postby Obsidian » 02 Aug 2009, 00:41

Also, there's the fact that assign_block_vars() is used to build a template loop. Any kind of list that you see generated in phpBB is usually built with the help of assign_block_vars().


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “phpBB Development discussion”

Who is online

Users browsing this forum: No registered users and 3 guests