public function getAllEntryIds() { if (!isset($this->_allEntryIds)) { if ($this->_fetchedAllEntries) { $this->_allEntryIds = array_keys($this->_entriesById); } else { $this->_allEntryIds = craft()->db->createCommand()->select('id')->from('formbuilder2_entries')->queryColumn(); } } return $this->_allEntryIds; }