public function canAdd()
    {
        $actor = $this->actor;
        $viewer = get_viewer();

        if ($actor) {
            if ($viewer->blocking($actor)) {
                return false;
            }

            $action = 'com_'.$this->_mixer->getIdentifier()->package.':'.$this->_mixer->getIdentifier()->name.':add';
            $ret = $actor->authorize('action', $action);

            return $ret !== false;
        }

        return false;
    }
public function canAdd()
    {
        $actor = $this->actor;
        $viewer = get_viewer();

        if ($actor) {
            if ($viewer->blocking($actor)) {
                return false;
            }

            $action = 'com_'.$this->_mixer->getIdentifier()->package.':'.$this->_mixer->getIdentifier()->name.':add';
            $ret = $actor->authorize('action', $action);

            return $ret !== false;
        }

        return false;
    }
public function canAdd ( ) { $ actor = $ this -> actor ; $ viewer = get_viewer ( ) ; if ( $ actor ) { if ( $ viewer -> blocking ( $ actor ) ) { return false ; } $ action = 'com_' . $ this -> _mixer -> getIdentifier ( ) -> package . ':' . $ this -> _mixer -> getIdentifier ( ) -> name . ':add' ; $ ret = $ actor -> authorize ( 'action' , $ action ) ; return $ ret !== false ; } return false ; }
Authorize if viewer can add.

@return bool
Authorize if viewer can add .