Sam Minnee
0d7c5a9ece
NEW Add/remove callbacks on RelationList
...
This provides a mechanism for adjusting the behaviour of these
relations when building more complex data models.
For example the following example has a status field incorporates a
Status field into the relationship:
```php
function MyRelation() {
$rel = $this->getManyManyComponents(‘MyRelation’);
$rel = $rel->filter(‘Status’, ‘Active’);
$rel->addCallbacks()->add(function ($relation, $item, $extra) {
$item->Status = ‘Active’;
$item->write();
});
}
```
Introduces a new library dependency: http://github.com/sminnee/callbacklist
2020-09-18 13:33:42 +12:00
..
2020-04-20 18:58:09 +01:00
2017-08-09 15:14:00 +12:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2018-06-08 23:05:24 +01:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-08-20 12:28:31 +12:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2016-12-19 16:08:19 +13:00
2016-12-19 16:08:19 +13:00
2017-10-26 16:21:51 +13:00
2020-04-20 18:58:09 +01:00
2018-11-10 12:10:25 +13:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2018-11-01 14:17:15 +13:00
2020-04-20 18:58:09 +01:00
2020-08-30 13:21:38 +12:00
2020-08-30 13:21:38 +12:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-05-04 09:10:51 +12:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-05-16 10:34:45 +01:00
2017-10-09 11:53:11 +13:00
2017-08-09 15:14:00 +12:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-05-16 10:34:45 +01:00
2018-06-08 14:41:04 +01:00
2018-02-05 12:04:57 +13:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2019-02-27 16:40:12 +13:00
2020-08-20 12:28:31 +12:00
2020-08-20 12:28:31 +12:00
2020-09-01 16:21:43 +12:00
2019-07-29 10:45:10 -03:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-08-06 11:18:39 +12:00
2018-11-10 12:10:25 +13:00
2020-09-10 17:08:13 +12:00
2020-09-10 17:08:13 +12:00
2017-02-09 15:28:59 +13:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2018-01-16 18:39:30 +00:00
2018-01-16 18:39:30 +00:00
2020-08-07 09:48:42 +12:00
2017-05-18 22:01:55 +12:00
2017-10-26 16:21:51 +13:00
2016-12-19 16:08:19 +13:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-09-18 13:33:42 +12:00
2018-09-27 17:09:24 +02:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2016-12-19 16:08:19 +13:00
2018-11-09 13:59:14 +02:00
2020-04-20 18:58:09 +01:00
2020-09-18 13:33:42 +12:00
2020-09-18 13:33:42 +12:00
2018-11-01 14:17:15 +13:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-08-30 13:21:38 +12:00
2020-08-30 13:21:38 +12:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2020-04-20 18:58:09 +01:00
2019-09-16 14:44:15 +12:00
2020-04-20 18:58:09 +01:00
2019-06-02 11:43:51 +03:00
2016-12-19 16:08:19 +13:00
2016-12-19 16:08:19 +13:00