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

locomotivemtl / charcoal-admin / 358 / 3
9%
master: 9%

Build:
DEFAULT BRANCH: master
Ran 19 Sep 2016 05:55PM UTC
Files 110
Run time 5s
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

19 Sep 2016 05:51PM UTC coverage: 5.911% (-0.1%) from 6.009%
358.3

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.

296 of 5008 relevant lines covered (5.91%)

0.11 hits per line

Source Files on job 358.3
  • Tree
  • List 0
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 358
  • Travis Job 358.3
  • 6e684275 on github
  • Prev Job for on master (#357.3)
  • Next Job for on master (#359.3)
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