4
votes
Accepted
Clearing the cache via API
ref: https://docs.expressionengine.com/latest/development/legacy/libraries/cache.html#class-methods
ee()->cache->delete('/myaddon/');
3
votes
How do I save a relationship field with save_entry()
I've managed to tackle this issue myself using the following. The key data structure is immediately below with a full example beneath that. This will handle all the relationship stuff automatically.
...
2
votes
Accepted
Model Service ChannelEntry relationship fields
I too had the same issue, the EE documentation to put it nicely is rather incomplete on this topic. Looking though the source I saw an example in ft.relationships.php:
ee('Model')->get('...
1
vote
Model Service ChannelEntry relationship fields
Yeah, you can save relationship data using below Model query. In below code $entry->field_id_2 indicates the relationship data.
$entry = ee('Model')->make('ChannelEntry');
$entry->channel_id ...
1
vote
Updating an entry field, without updating every field
It certainly is!
Here's what you need to do (From the manual) based on your example :
ee()->load->library('api');
ee()->api->instantiate('channel_entries');
ee()->api->instantiate(...
1
vote
Fetch entry using PHP
I was able to use the Bones plugin and get data over the ACT (Action) APIs, such as:
?ACT=40&url_title=$sSlug
Or:
?ACT=40&entry_id=$nEntryID
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
channel-entries-api × 31channel × 7
channel-entries × 6
api × 6
ee2 × 4
safecracker × 4
add-on-development × 4
matrix × 3
php × 3
playa × 2
database × 2
extension × 2
expresso-store × 1
categories × 1
pixelandtonic × 1
structure × 1
module × 1
plugin × 1
devdemon × 1
entries × 1
expresso × 1
fields × 1
hook × 1
entry × 1
cache × 1