Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Finding out if class has an "Live Extension"


Go to End


2 Posts   1597 Views

Avatar
bezarre

Community Member, 13 Posts

21 August 2010 at 8:34am

Hello,

is there a function which returns me (with the help of an classname) the answer if the class uses the versioned extension?

I found Versioned::hasVersionField ( $table ) but this doesn't work, this returns to me by BlogEntry (from the Blogmodul): false

Can someone help me?

Bez

Avatar
dpde

Community Member, 15 Posts

3 April 2012 at 12:44am

Edited: 03/04/2012 12:45am

I know this post is old but just for others who searches this too:
http://api.silverstripe.org/2.4/sapphire/core/Object.html#methodhas_extension

Example:

Object::has_extension('ClassName', 'Versioned');