/** * Insert into database data of the new validator * * @param array $data Data of the new validator * @param int $lang Langauge id * * @return integer */ public function insert($data, $lang) { if (empty($data)) { throw new Exception('Parameter data is empty.'); } // Creates the data entry in the ObjectData Table $dataObject = new FormQuestionValidation(); $_row = $dataObject->createRow($data); $_row->save(); $_dataId = $this->_dataId; $_insertedId = $_row->{$_dataId}; return $_insertedId; }