Prado\TComponent::enableBehavior PHP Method

enableBehavior() public method

A behavior is only effective when it is enabled. A behavior is enabled when first attached. Behaviors may implement the function: public function dyEnableBehavior($name,$behavior[, $chain]) { } to be executed when enableBehavior is called. All attached behaviors are notified through dyEnableBehavior.
Since: 3.2.3
public enableBehavior ( $name )
    public function enableBehavior($name)
    {
        if ($this->_m != null && isset($this->_m[$name])) {
            if ($this->_m[$name] instanceof IBehavior) {
                $this->_m[$name]->setEnabled(true);
                $this->dyEnableBehavior($name, $this->_m[$name]);
                return true;
            }
            return false;
        }
        return null;
    }