PHPackages                             restruct/silverstripe-oembeddable - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. restruct/silverstripe-oembeddable

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

restruct/silverstripe-oembeddable
=================================

OEmbed field (extracted from sheadawson/linkable)

0.1(4y ago)03BSD-3-ClausePHP

Since Jun 16Pushed 4y ago2 watchersCompare

[ Source](https://github.com/restruct/silverstripe-oembeddable)[ Packagist](https://packagist.org/packages/restruct/silverstripe-oembeddable)[ RSS](/packages/restruct-silverstripe-oembeddable/feed)WikiDiscussions main Synced 6d ago

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

SilverStripe OEmbeddable
========================

[](#silverstripe-oembeddable)

This module contains an OEmbeddable DataObject and a OEmbeddableField to easily add oEmbed content to a DataObject or Page. These were extracted, renamed &amp; improved from [linkable](https://github.com/sheadawson/silverstripe-linkable) so they can be used on their own. (We use [NamedLinkField](https://github.com/restruct/silverstripe-namedlinkfield) module instead of Linkable).

Example usage
-------------

[](#example-usage)

Add a `$has_one` to `OEmbeddable` and insert `OEmbeddableField` to manage its contents.

```
use Restruct\Silverstripe\OEmbedable\OEmbeddable;
use Restruct\Silverstripe\OEmbedable\OEmbeddableField;

class Page extends SiteTree
{
	private static $has_one = [
		'EmbedVideo' => OEmbeddable::class,
	];

	public function getCMSFields()
	{
		$fields = parent::getCMSFields();

		$fields->addFieldToTab(
		    'Root.Main',
		    OEmbeddableField::create(
		        'EmbedVideo',
		        'Video from oEmbed URL',
		        $this->EmbedVideo()
		    )
		);

		return $fields;
	}
}
```

In your template, you can render the object with the name of the has\_one relation

```
$EmbedVideo
```

You can also access other metadata on the object via

```
$EmbedVideo.Title
$EmbedVideo.Description
$EmbedVideo.ThumbURL
```

Switching from Linkable to OEmbeddable
--------------------------------------

[](#switching-from-linkable-to-oembeddable)

Probably you should be able to use the upgrader tool, the new classnames are included in .upgrade.yml but I haven't tested this.

To upgrade manually, simply remove the Linkable module

### Keep Linkable module alongside OEmbeddable

[](#keep-linkable-module-alongside-oembeddable)

**NOTE:** in case you're actually using the Linkable fields you may either just stay with that module OR change the `$table_name` for `OEmbeddable` (or the `EmbeddedObject` of Linkable). Then the two should be able to coexist peacefully alongside eachother. (In the SS4 updated version of Linkable we had to correct the value `$table_name` anyway).

You may **correct** the value of $db\_field after a SS3-&gt;4 upgrade via Yaml config:

```
Sheadawson\Linkable\Models\EmbeddedObject:
  table_name: 'EmbeddedObject'
```

You may **update/change** its value (or that of OEmbeddable) to make the two work alongside:

```
Sheadawson\Linkable\Models\EmbeddedObject:
  table_name: 'LinkableEmbeddedObject' # this way OEmbeddable can use EmbeddedObject as table_name
```

**OR** change OEmbeddable to use a different table\_name (remember to also correct that of Linkable):

```
Restruct\Silverstripe\OEmbedable\OEmbeddable:
  table_name: 'OEmbeddable'
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

1797d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4d3680d6353e5f171543435b89965ba2588186ad7ec0ec97cbf572704fec2a4f?d=identicon)[micschk](/maintainers/micschk)

---

Top Contributors

[![micschk](https://avatars.githubusercontent.com/u/1005986?v=4)](https://github.com/micschk "micschk (3 commits)")

---

Tags

silverstripe

### Embed Badge

![Health badge](/badges/restruct-silverstripe-oembeddable/health.svg)

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

###  Alternatives

[kinglozzer/multiselectfield

A sortable multiple select field for managing many-to-many relations

1341.2k2](/packages/kinglozzer-multiselectfield)[wedevelopnl/silverstripe-elemental-grid

Elemental grid module

1014.1k2](/packages/wedevelopnl-silverstripe-elemental-grid)

PHPackages © 2026

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