protected function _actionTogglesubscription($context)
    {
        if ($this->getItem()->subscribed(get_viewer())) {
            $ret = $this->_mixer->execute('unsubscribe', $context);
        } else {
            $ret = $this->_mixer->execute('subscribe', $context);
        }

        return $ret;
    }
protected function _actionTogglesubscription($context)
    {
        if ($this->getItem()->subscribed(get_viewer())) {
            $ret = $this->_mixer->execute('unsubscribe', $context);
        } else {
            $ret = $this->_mixer->execute('subscribe', $context);
        }

        return $ret;
    }
protected function _actionTogglesubscription ( $ context ) { if ( $ this -> getItem ( ) -> subscribed ( get_viewer ( ) ) ) { $ ret = $ this -> _mixer -> execute ( 'unsubscribe' , $ context ) ; } else { $ ret = $ this -> _mixer -> execute ( 'subscribe' , $ context ) ; } return $ ret ; }
If the viewer is subscribe then unsubscribe, if not subscribe then subscribe.

@param AnCommandContext $context Context parameter
If the viewer is subscribe then unsubscribe if not subscribe then subscribe .