protected function _actionPost(AnCommandContext $context)
    {
        $data = $context->data;

        $viewer = get_viewer();

        $setting = $this->getService('repos:notifications.setting')->findOrAddNew(array(
            'person' => $viewer,
            'actor' => $this->actor,
        ));

        $setting->setValue('posts', null, $data->email);

        $setting->save();
    }
protected function _actionPost(AnCommandContext $context)
    {
        $data = $context->data;

        $viewer = get_viewer();

        $setting = $this->getService('repos:notifications.setting')->findOrAddNew(array(
            'person' => $viewer,
            'actor' => $this->actor,
        ));

        $setting->setValue('posts', null, $data->email);

        $setting->save();
    }
protected function _actionPost ( AnCommandContext $ context ) { $ data = $ context -> data ; $ viewer = get_viewer ( ) ; $ setting = $ this -> getService ( 'repos:notifications.setting' ) -> findOrAddNew ( array ( 'person' => $ viewer , 'actor' => $ this -> actor , ) ) ; $ setting -> setValue ( 'posts' , null , $ data -> email ) ; $ setting -> save ( ) ; }
Sets a notification setting.

@param AnCommandContext $context Context parameter
Sets a notification setting .