/** * @param Column $newAreaLayout * * @return int */ public function duplicate($newAreaLayout) { $db = Database::connection(); $v = array($newAreaLayout->getAreaLayoutID(), $this->arLayoutColumnIndex, $this->arLayoutColumnDisplayID); $db->executeQuery('insert into AreaLayoutColumns (arLayoutID, arLayoutColumnIndex, arLayoutColumnDisplayID) values (?, ?, ?)', $v); $newAreaLayoutColumnID = $db->Insert_ID(); return $newAreaLayoutColumnID; }
/** * @param Column $newAreaLayout * @return int */ protected function duplicate($newAreaLayout) { $db = Loader::db(); $v = array($newAreaLayout->getAreaLayoutID(), $this->arLayoutColumnIndex, $this->arLayoutColumnDisplayID); $db->Execute('insert into AreaLayoutColumns (arLayoutID, arLayoutColumnIndex, arLayoutColumnDisplayID) values (?, ?, ?)', $v); $newAreaLayoutColumnID = $db->Insert_ID(); return $newAreaLayoutColumnID; }