Using getCriteria with a custom element type I've setup a custom element type for badges for a system I'm building, but I've run into some trouble trying to query for badges using craft()-&gt;elements-&gt;getCriteria(ElementType::Badges_Badge);, however I'm getting an error saying 'Undefined class constant 'Badges_Badge', but when I loop through all element types using getAllElementTypes() I see an entry for 'Badges_Badges', and I'm able to add and edit badges in the cms. 

Is it impossible to query for custom elements using getCriteria, or am I missing something more fundamental?
Fixed it for now by including a custom enum class in the base plugin file:
    

abstract class CustomElementType extends BaseEnum
{
    const Badges_Badge = 'Badges_Badge';
}


and then querying for the custom element in the plugin using craft()-&gt;elements-&gt;getCriteria(CustomElementType::Badges_Badge);