Item and Fields Array - Documentation?

More
13 years 4 months ago #17761 by Brat
Hello. I'm writing a custom Flexicontent plugin. The plugin will contain the following function:
Code:
function onCompleteSaveItem( &$item, &$fields )

The problem is, I cannot find any documentation detailing the $item and the $fields array contructs. Without this documentation, it is very difficult for me to access the data within these arrays.

Is there any such documentation anywhere? If not, is there a Flexicontent file that at least lists the fields these arrays contain? Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 4 months ago #17762 by ggppdk
Hello,
there is no documentation for what you ask, other that the source code itself.

You can look at the code of another plugin, also you when you use var_dump() or print_r() on these variable to an: echo "<pre>" before ..., to be easier to read.

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
13 years 4 months ago #17778 by Brat
I thought as much. ;)

Question - how do I do a "var dump" within a plugin? I've tried print_r() and var_dump() when testing the plugin code, but nothing prints out to the screen.

Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 4 months ago #17780 by ggppdk
Try:
echo "<pre>";
print_r(item);
exit();

If the execution doesn't stop, then your plugin code is not called ...


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
13 years 4 months ago #17782 by Brat
I will give it a try, and report back. Thanks again! 8-)

Please Log in or Create an account to join the conversation.

More
13 years 4 months ago #17785 by Brat
Tried it - the code works! Thanks! :D

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.383 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline