Path: blob/master/src/applications/calendar/management/PhabricatorCalendarManagementNotifyWorkflow.php
12256 views
<?php12final class PhabricatorCalendarManagementNotifyWorkflow3extends PhabricatorCalendarManagementWorkflow {45protected function didConstruct() {6$this7->setName('notify')8->setExamples('**notify** [options]')9->setSynopsis(10pht(11'Test and debug notifications about upcoming events.'))12->setArguments(13array(14array(15'name' => 'minutes',16'param' => 'N',17'help' => pht(18'Notify about events in the next __N__ minutes (default: 15). '.19'Setting this to a larger value makes testing easier.'),20),21));22}2324public function execute(PhutilArgumentParser $args) {25$viewer = $this->getViewer();2627$engine = new PhabricatorCalendarNotificationEngine();2829$minutes = $args->getArg('minutes');30if ($minutes) {31$engine->setNotifyWindow(phutil_units("{$minutes} minutes in seconds"));32}3334$engine->publishNotifications();3536return 0;37}3839}404142