Commit 3926ad51 authored by Ad Schellevis's avatar Ad Schellevis

(mvc model) return if item was deleted on arrayfield's del action

parent 03a759dc
......@@ -99,11 +99,15 @@ class ArrayField extends BaseField
/**
* remove item by id (number)
* @param string $index index number
* @return bool item found/deleted
*/
public function del($index)
{
if (array_key_exists((string)$index, $this->internalChildnodes)) {
unset($this->internalChildnodes[$index]);
return true;
} else {
return false;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment