Prado\TComponent::unlisten PHP Метод

unlisten() публичный Метод

Behaviors may implement the function: public function dyUnlisten($globalEvents[, $chain]) { $this->behaviorUnlisten(); //eg } to be executed when listen is called. All attached behaviors are notified through dyUnlisten.
public unlisten ( ) : numeric
Результат numeric the number of global events that were unregistered from the global event registry
    public function unlisten()
    {
        if (!$this->_listeningenabled) {
            return;
        }
        $fx = array_filter(get_class_methods($this), array($this, 'filter_prado_fx'));
        foreach ($fx as $func) {
            $this->detachEventHandler($func, array($this, $func));
        }
        if (is_a($this, 'Prado\\Util\\IDynamicMethods')) {
            $this->detachEventHandler(TComponent::GLOBAL_RAISE_EVENT_LISTENER, array($this, '__dycall'));
            array_push($fx, TComponent::GLOBAL_RAISE_EVENT_LISTENER);
        }
        $this->_listeningenabled = false;
        $this->dyUnlisten($fx);
        return count($fx);
    }