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
2019-11-20 16:26:13 +13:00
2017-04-28 14:59:42 +12:00
2020-06-15 12:35:00 +12:00
2018-06-01 10:14:42 +12:00
2017-10-12 11:53:12 +13:00
2017-12-05 12:14:22 +00:00
2020-05-28 18:05:21 +12:00
2020-07-13 12:26:06 +12:00
2018-06-20 17:58:51 +12:00
2017-12-05 14:20:13 +00:00
2018-02-08 10:32:56 +00:00
2020-04-20 20:51:15 +01:00

SilverStripe Framework

Build Status Build Docs Latest Stable Version Latest Unstable Version codecov SilverStripe supported module Total Downloads License

PHP framework forming the base for the SilverStripe CMS (https://silverstripe.org). Requires a silverstripe-installer base project. Typically used alongside the cms module.

Installation

See installation on different platforms, and installation from source.

Bugtracker

Bugs are tracked on github.com. Please read our issue reporting guidelines.

Development and Contribution

If you would like to make changes to the SilverStripe core codebase, we have an extensive guide to contributing code.

Attribution

Description
No description provided
Readme 162 MiB
Languages
PHP 99.4%
Scheme 0.5%