Within a plugin I am fetching existing entries using the CriteriaModel class as documented here http://buildwithcraft.com/docs/plugins/working-with-elements#fetching-elements, specifically like this:
$existing = craft()->elements->getCriteria($this->entry->elementType)->first(array(
'someHandle' => 'someValue'
))
However I am finding this only returns a result if an ENABLED entry is found. I can see that I can search for ONE particular enabled state as follows:
$existing = craft()->elements->getCriteria($this->entry->elementType)->first(array(
'someHandle' => 'someValue',
'enabled' => 1
))
Or...
$existing = craft()->elements->getCriteria($this->entry->elementType)->first(array(
'someHandle' => 'someValue',
'enabled' => 0
))
But how can I search for ALL entries regardless of the enabled state?
And also, what is the difference between the status and enabled properties on the model? I can see constants for ENABLED, DISABLED and ARCHIVED. I'm not clear on how this differs from the boolean value that the enabled property has.