Commit 8f3d42cf authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Added a method to remove a value by searching for it in dialog attributes

parent d7233a76
......@@ -166,6 +166,14 @@ class DialogAttribute extends SetAttribute
trigger_error("abstract method");
}
function searchAndRemove ($value)
{
$row = array_search($value, $this->value);
if ($row !== FALSE) {
$this->removeValue($row);
}
}
protected function removeValue ($row)
{
unset($this->value[$row]);
......
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