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.

General Questions

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

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

Finding out if class has an "Live Extension"


Reply

2 Posts   907 Views

Avatar
bezarre

21 August 2010 at 8:34am Community Member, 13 Posts

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

3 April 2012 at 12:44am (Last edited: 3 April 2012 12:45am), Community Member, 14 Posts

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');