Download the PHP package restruct/silverstripe-oembeddable without Composer
On this page you can find all versions of the php package restruct/silverstripe-oembeddable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download restruct/silverstripe-oembeddable
More information about restruct/silverstripe-oembeddable
Files in restruct/silverstripe-oembeddable
Package silverstripe-oembeddable
Short Description OEmbed field (extracted from sheadawson/linkable)
License BSD-3-Clause
Informations about the package 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 & improved from linkable so they can be used on their own. (We use NamedLinkField module instead of Linkable).
Example usage
Add a $has_one
to OEmbeddable
and insert OEmbeddableField
to manage its contents.
In your template, you can render the object with the name of the has_one relation
You can also access other metadata on the object via
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
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->4 upgrade via Yaml config:
You may update/change its value (or that of OEmbeddable) to make the two work alongside:
OR change OEmbeddable to use a different table_name (remember to also correct that of Linkable):