Missing loadItem function

More
6 years 7 months ago - 6 years 7 months ago #69028 by Soleo
Good morning,

I've read somewhere you updated your database model with the latest update, and you removed the loadItem function, I'm wondering what are the steps now to get the same result in this case :



Thanks in advance.
Last edit: 6 years 7 months ago by Soleo.

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

More
6 years 7 months ago #69029 by ggppdk
Replied by ggppdk on topic Missing loadItem function
Hello

it was replaced with _loadRecord()

but why are you using _loadItem() or _loadRecord() ?

you should be using
Code:
$item_data = $model->getItem($pk);


-- 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...
The following user(s) said Thank You: Soleo

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

More
6 years 7 months ago - 6 years 7 months ago #69031 by Soleo
Replied by Soleo on topic Missing loadItem function
Well that's a good question, since it's not my own code and the previous dev left, I'm clueless about why he used this instead of getItem.

Anyway look like getItem work, but is this needed to call it with the primary key in my case where I already fill $model->_id before ?
Last edit: 6 years 7 months ago by Soleo.

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

More
6 years 7 months ago #69032 by ggppdk
Replied by ggppdk on topic Missing loadItem function
Hello

getItem()

will also set primary key


-- 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
6 years 7 months ago - 6 years 7 months ago #69057 by Soleo
Replied by Soleo on topic Missing loadItem function
Alright,

Thank you !
Last edit: 6 years 7 months ago by ggppdk.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.485 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