• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

locomotivemtl / charcoal-admin / 358
9%

Build:
DEFAULT BRANCH: master
Ran 19 Sep 2016 05:55PM UTC
Jobs 3
Files 110
Run time 32s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
358

push

travis-ci

mcaskill
Improved data-merging for widgets

Before, merging of data from the HTTP request or the object model was done without the possibility to ignore either source (or to provide an extra source).

This commit introduces new methods for configuring how and from where a widget’s data comes from. The ‘TableWidget’ and ‘ObjectFormWidget’ have been updated to take advantage of these configurable/optional extra data sources.

Basic customization of additional data sources:

```
{
  "type": "charcoal/admin/widget/table",
  "collection_ident": “foobar”,
  "obj_type": “charcoal/cms/section",
  "data_sources": [ "request", "object" ]
}
```

Where `request` and `object` are valid sources (defined in `AdminWidget::acceptedDataSources()` which are invoked as `dataFrom<Source>()` on the widgets, if present.

A “merge strategy” can be defined by passing the data sources as an associative array of callables.

```
"data_sources": { "request": "myCustomDataSource", "object": "array_merge_recursive" }
```

Where `myCustomDataSource` and `array_merge_recursive` are functions used to merge data. The `myCustomDataSource`, in the context of `TableWidget` and `ObjectFormWidget`, is a method you'd define on your `Section` model.

364 of 5484 relevant lines covered (6.64%)

0.32 hits per line

Jobs
ID Job ID Ran Files Coverage
1 358.1 19 Sep 2016 05:55PM UTC 0
6.41
Travis Job 358.1
2 358.2 19 Sep 2016 05:55PM UTC 0
6.41
Travis Job 358.2
3 358.3 19 Sep 2016 05:54PM UTC 0
5.91
Travis Job 358.3
Source Files on build 358
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #358
  • 6e684275 on github
  • Prev Build on master (#357)
  • Next Build on master (#359)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc