gnsbud
commented Friday, 20 March 2015
Author
Hi,
I'm trying to write small csvirules plugin. In "replace" plugin I can see comment:
* @param array $fields All fields used for import/export
how can I access keys and values in $fields array? No matter what I try, returning message is the same:
Cannot use object of type CsviHelperFields as array
Best regards,
Chris
gnsbud
commented Saturday, 21 March 2015
Author
Hi,
nevermind, did something like:
$fields->getData()
then I was able to access $fields as an array.
Best regards,
Chris
rolandd
commented Saturday, 21 March 2015
Support
Hello Chris,
Ah, the $fields docblock is incorrect. It is indeed no longer an array but a class. You can also use:
$fields->getFields();
to just get the fields. Thanks for posting your findings.
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Log in to reply to this topic.