/** * Return an array with the elements according to the parameters * * @param int $id * @param int $langId * @param string $type * * @return array */ protected function _selectElements($id, $all = false) { $oElem = new FormElement(); $oElemType = new FormElementType(); $select = $oElem->select()->setIntegrityCheck(false)->from($oElem->getName())->joinInner($oElemType->getName(), 'FET_ID = FE_TypeID', 'FET_Title'); if (!$all) { $select->where('FE_ID = ?', $id); } else { $select->where('FE_SectionID = ?', $id); } $select->order('FE_Seq ASC'); $elements = $oElem->fetchAll($select)->toArray(); return $elements; }