elFinder\elFinder::unbind PHP Method

unbind() public method

Remove event (command exec) handler
Author: Dmitry (dio) Levashov
public unbind ( $cmd, $handler ) : elFinder
return elFinder
    public function unbind($cmd, $handler)
    {
        if (!empty($this->listeners[$cmd])) {
            foreach ($this->listeners[$cmd] as $i => $h) {
                if ($h === $handler) {
                    unset($this->listeners[$cmd][$i]);
                    return $this;
                }
            }
        }
        return $this;
    }