Skip to content

Commit 890f90f

Browse files
committed
Updating readme with a ModelHooks set/unset Method example
1 parent d4b5230 commit 890f90f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ class MyCustomHook implements ModelHookInterface
301301
}
302302

303303
$command->setProperty('custom', 'string', true, false, 'My custom property');
304+
$command->unsetMethod('method');
305+
$command->setMethod('method', $command->getMethodType($model, '\Some\Class'), ['$param']);
304306
}
305307
}
306308
```

0 commit comments

Comments
 (0)