Owl\Services\MailNotifyService::updateSetting PHP Метод

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

Update mail setting
public updateSetting ( integer $userId, string $type, string $flag ) : boolean
$userId integer
$type string
$flag string
Результат boolean
    public function updateSetting($userId, $type, $flag)
    {
        $columnName = $this->getFlagColomunName($type);
        return !!$this->mailNotify->update([$columnName => $flag === 'true' ? 1 : 0], ['user_id' => $userId]);
    }

Usage Example

Пример #1
0
 public function testShouldReturnUpdateResult()
 {
     $this->userMailNotifyCriteria->shouldReceive('update')->andReturn(true);
     $service = new MailNotifyService($this->userMailNotifyCriteria);
     $this->assertTrue($service->updateSetting(1235, 'comment', 0));
 }
All Usage Examples Of Owl\Services\MailNotifyService::updateSetting