Can I use getCriteria to only return entries with a specified lightswitch field set to on? I'm building a plugin that will check all existing entries in a section when a single entry is flagged as featured and turn off any existing featured entries. I'm using a lightswitch field to turn on and off entries. Is there a way to use the craft()-&gt;elements-&gt;getCriteria(ElementType::Entry); to return just the entries with the lightswitch field turned on?

Cheers
This should do it:

$criteria = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry);
$criteria-&gt;section = 'mySection';
$criteria-&gt;myLightswitchField = 1;
$entries = $criteria-&gt;find();