Render attribute with "default" value
I have multiple collection attributes in a block-form.
It saves perfectly and works in my view, but when I want to edit the block I can't seem to load the attribute with the saved values from the block.
I would like to do the following:
How do I get this to work?
The proper value is not a string or anything like that, it is a value object for the attribute.
Say your attribute is attached to a Page object $page.
You would do $my_value = $page->getAttributeValueObject($ak);
Thanks for answering!
Is there a way that I can "create" the AttributeValueObject based on a string or int?
For instance the address attribute has different properties for each part of the address.
The select attribute is a bit of a monster with an option list object and option item objects
I've been trying this for 2 days now, but I can't seem to make it happen... :(
Some are pretty simple like the Boolean attribute and others like the Select attribute are a pain in the neck