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   943 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, 14 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');