You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nah. The current signature matches ViewModel($variables, $options); aswell as partial($template, $variables) and partialLoop($template, $variables);
They make sense imho as the model doesn't always require options and is therefore less important.
Same goes for the renderers. They require template name which should be prio 1. They however don't require variables.
After a bit of usage, I've realized that the order of parameters is a bit inconsistent. When creating a a ResourceViewModel, it is:
return new ResourceViewModel(['user' => $user], ['template' => 'user']);
However the resourceRender helper work like this:
$this->renderResource('templateName', ['user' => $user]);
I'm considering changing that for 0.5 to keep the same order. What do you think @grizzm0 ?
The text was updated successfully, but these errors were encountered: