All Questions
Tagged with element elementquery
2 questions
3
votes
2
answers
1k
views
Craft 3 plugin - how to update entry with field of Entries type
Using PHP, I want to update a field of Entries type of an existing entry.
Fields of type Text and Number will update with the following code:
$entry = Entry::find()->id($entryId)->one();
$...
1
vote
1
answer
47
views
Array from matrix fields without quotations
I am trying to create an array bodyBlocks by looping through all of my matrix fields called blockTextContent:
$bodyBlocks = [];
foreach ($entry->getFieldValue('pageBuilder')->all() as $block){
...