PHPackages                             axyr/silverstripe-externaldata - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. axyr/silverstripe-externaldata

ActiveSilverstripe-module[Admin Panels](/categories/admin)

axyr/silverstripe-externaldata
==============================

Custom DataObject/ModelAdmin implementation to work with external data sources

3.7.x-dev(7y ago)92.2k7[3 PRs](https://github.com/axyr/silverstripe-externaldata/pulls)BSD-3-ClausePHP

Since Aug 29Pushed 7y ago4 watchersCompare

[ Source](https://github.com/axyr/silverstripe-externaldata)[ Packagist](https://packagist.org/packages/axyr/silverstripe-externaldata)[ RSS](/packages/axyr-silverstripe-externaldata/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

silverstripe-externaldata
=========================

[](#silverstripe-externaldata)

Custom DataObject/ModelAdmin implementation to work with external data sources

The aim is have an easy way to use ModelAdmin and GridField with data from external datasources.

Just create a Model which extends ExternalDataObject and implement your own `get()`, `write()` and `delete()` methods to work with your custom external data connection. There are some basic examples included for a MongoDB, REST and external MySQL connection.

This module is Work In Process, and some things are likely to change!!!!

\####Things that work :

- Create, Read, Update, Delete
- FormScaffolding
- FieldCasting
- Summary Fields
- FieldLabels
- Limited canView, canEdit checks

\####Things that don't work :

- HasOne, HasMany, ManyMany relations
- SearchFormScaffolding

\##ExternalDataObject This is the base Object you need to extend you Model from. A lot of code is copied from DataObject.php so things like SummaryFields, FormScaffolding and `$form->saveInto()` just works like DataObject. Therefore you still need to add a static `$db` array, like you do for normal DataObjects.

\###Example

```
  class MyExternalDataObject extends ExternalDataObject {

	// you need this to make FormScaffolding work
  	static $db = array(
  		'Title'	=> 'Varchar(255)'
  	);

  	public static function get() {
  		$list = parent::get();

  		// add your code to get a $result of remote records
  		// ExternalDataAdmins GridField will use this list as well to get 1 item from the list
  		foreach($result as $item) {
  			$list->push(new MyExternalDataObject($item));
  		}

  		return $list;
  	}

  	public static function get_by_id($id) {
  		// add your code to get one remote record
  		// This is used in the ExternalDataPage example
  	}

  	public function write() {
  		// add your code to write/update a remote record
  	}

  	public function delete() {
  		// add your code to delete a remote record
  		$this->flushCache();
  		$this->ID = '';
  	}
  }

```

\##ExternalDataAdmin Extends ModelAdmin, but a few custom GridField Components are replaced to make sure the GridField can work with external data. The SearchScaffolder is stripped out, since this is not that easy to implement when you don't know the external datasource and structure.

\##Examples I added some basic examples in the examples folder, which you can also test in frontend with ExternalDataPage. If you just want to use them after downloading, just remove the `_manifest_exclude` file.

Note that **MongoDBExternalDataObject** requires the PHP MongoDB extension :

The **ExternalRestDataObject** requires the RestFullserver module :

This examples just connects local to `Director::absoluteBaseURL() . 'api/v1'` and queries the RestDataObject table

The **ExternalMySQLDataObject** example uses also the RestDataObject table. You need to set the static `$remote_database_config` variable with the correct database credentials.

function getID()
----------------

[](#function-getid)

The ExternalDataObject still requires an ID value for you external records to make CRUD work. Some datasources, like MongoDB, allows an object to be the unique identifier, and an identifier might also be a string. Use this method to convert your external datasource unique identifier to a `$this->ID` value.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2864d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9fcc5eb430262d4da52fd7a23b2af3cd126402a67a62e08707fd26bd8c3d2c3f?d=identicon)[axyr](/maintainers/axyr)

---

Top Contributors

[![axyr](https://avatars.githubusercontent.com/u/345155?v=4)](https://github.com/axyr "axyr (20 commits)")[![TheBnl](https://avatars.githubusercontent.com/u/1334195?v=4)](https://github.com/TheBnl "TheBnl (1 commits)")

---

Tags

silverstripecmsmodulecrudmodeladminexternal data

### Embed Badge

![Health badge](/badges/axyr-silverstripe-externaldata/health.svg)

```
[![Health](https://phpackages.com/badges/axyr-silverstripe-externaldata/health.svg)](https://phpackages.com/packages/axyr-silverstripe-externaldata)
```

###  Alternatives

[unclecheese/dashboard

Adds a dashboard to the SilverStripe CMS

4742.3k1](/packages/unclecheese-dashboard)[stevie-mayhew/hasoneedit

Allows editing the fields of a has\_one object directly in the CMS

21225.4k11](/packages/stevie-mayhew-hasoneedit)[praxisnetau/silverstripe-moderno-admin

A SilverStripe module to give the CMS a more modern, flat appearance.

224.4k](/packages/praxisnetau-silverstripe-moderno-admin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
