public function removeChild($parent, $child)
{
if (isset($this->children[$parent->name][$child->name])) {
unset($this->children[$parent->name][$child->name]);
$this->saveItems();
return true;
} else {
return false;
}
}
/** * @return bool */ public function unChild() { $item = $this->getItem($this->name, $this->type); list($childname, $childtype) = explode('_t', $this->new_child); $child = $this->getItem($childname, $childtype); if ($child && $this->_authMan->removeChild($item, $child)) { // sleep(3); //necessary sleep time - wait while update auth file return true; } else { return false; } }