LPH
Well-known member
PhpStorm returns a message that the fn method is deprecated and so the following code needs to be updated:
The templater.php file shows several different fnBbCode options.
I've tried this code but it clearly isn't correct and states items are missing. The 'bb_code' is $bbCode.
Can someone please explain to me the parameters? Maybe there is a file in XF that uses the fnBbCode and so I can use it as a reference.
PHP:
return XF::app()->templater()->fn( 'bb_code', [ $user['about'], $user, 'escaped' ] );
The templater.php file shows several different fnBbCode options.
Code:
'bb_code' => 'fnBbCode',
'bb_code_snippet' => 'fnBbCodeSnippet',
'bb_code_type' => 'fnBbCodeType',
'bb_code_type_snippet' => 'fnBbCodeTypeSnippet',
I've tried this code but it clearly isn't correct and states items are missing. The 'bb_code' is $bbCode.
Code:
return XF::app()->templater()->fnBbCode( 'bb_code', $user [ $user['about'] ]);
Can someone please explain to me the parameters? Maybe there is a file in XF that uses the fnBbCode and so I can use it as a reference.