protected configureProcess ( Symfony\Component\Process\ProcessBuilder $processBuilder, Joli\JoliNotif\Notification $notification ) | ||
$processBuilder | Symfony\Component\Process\ProcessBuilder | |
$notification | Joli\JoliNotif\Notification |
protected function configureProcess(ProcessBuilder $processBuilder, Notification $notification)
{
$script = 'display notification "' . str_replace('"', '\\"', $notification->getBody()) . '"';
if ($notification->getTitle()) {
$script .= ' with title "' . str_replace('"', '\\"', $notification->getTitle()) . '"';
}
$processBuilder->add('-e');
$processBuilder->add($script);
}