Closed MAFLO321 closed 6 years ago
Why can't these be set in the controller table and passed into the function?
$thingy = 'foo';
//$this->loadComponent('Upload', [
$this->addBehaviour('Upload', [
'nameCallback' => function ($data, $settings) use ($thingy) {
Its not a component.
Wouldn't the same apply to a behaviour though?
@saeideng I have added backwards compatibility as you said. @josegonzalez Should i squash commits or let them as separate commits?
Fancy.
Can this PR be tagged in a new release? It can be used to use a virtual property as part of the filename, (currently it only is possible in the path)
Yes it can, whenever someone has time to do that.
This adds
$table
,$entry
and$field
to the signature of thenameCallback
function.That gives the ability to change the
filename
more dynamically.For example
It is now possible to update the name of a file only if it is a new entity: