Shows the edit schedule maintenance form.

@param \CachetHQ\Cachet\Models\Schedule $schedule

@return \Illuminate\View\View
543054
public function showEditSchedule(Schedule $schedule)
    {
        $incidentTemplates = IncidentTemplate::all();

        return View::make('dashboard.maintenance.edit')
            ->withPageTitle(trans('dashboard.schedule.edit.title').' - '.trans('dashboard.dashboard'))
            ->withIncidentTemplates($incidentTemplates)
            ->withSchedule($schedule);
    }
271617
public function schedule_cron( $schedules ) {
		$schedules[ $this->id ] = array(
			'interval' => MINUTE_IN_SECONDS * $this->interval,
			'display'  => sprintf( __( 'Every %d Minutes' ), $this->interval ),
		);

		return $schedules;
	}
1141378
public function show($id)
    {
        $scheduler = Scheduler::findOrFail($id);

        return view('eyewitness::scheduler.show')->withEye(app(Eye::class))
                                                 ->withScheduler($scheduler)
                                                 ->withHistories($scheduler->history()->simplePaginate(config('eyewitness.pagination_size', 50)))
                                                 ->withTransformer(new ChartTransformer);
    }
321677
public function edit(HpsPayPlanSchedule $schedule)
    {
        $data = $schedule->getEditableFieldsWithValues( $schedule );
        $result = $this->doRequest($data, array(
            'verb'     => 'PUT',
            'endpoint' => 'schedules/'.$schedule->scheduleKey,
        ));
        return $this->hydrateObject($result, 'HpsPayPlanSchedule');
    }
294674
public static function getEditableFields( HpsPayPlanSchedule $schedule = null  )
    {
        $editableFields = array(
            'scheduleName',
            'scheduleStatus',
            'deviceId',
            'paymentMethodKey',
            'subtotalAmount',
            'taxAmount',
            'numberOfPaymentsRemaining',
            'endDate',
            'reprocessingCount',
            'emailReceipt',
            'emailAdvanceNotice',
            'processingDateInfo',
            'invoiceNbr',
            'description',
        );
        if ($schedule->scheduleStarted === true){
            $editableFields[] = 'cancellationDate';
            $editableFields[] = 'nextProcessingDate';
        }
        // Only editable when scheduleStarted = false
        else{
            $editableFields[] = 'scheduleIdentifier';
            $editableFields[] = 'startDate';
            $editableFields[] = 'frequency';
            $editableFields[] = 'duration';
        }
        return  $editableFields;
    }
1295015
public function deleteScheduleAction(Schedule $schedule)
    {
        execute(new DeleteScheduleCommand($schedule));

        return cachet_redirect('dashboard.schedule')
            ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.schedule.delete.success')));
    }
843055
public function add(HpsPayPlanSchedule $schedule)
    {
        $data = $schedule->getEditableFieldsWithValues();
        $data['customerKey'] = $schedule->customerKey;
        $data['numberOfPayments'] = $schedule->numberOfPayments;
        $result = $this->doRequest($data, array(
            'verb'     => 'POST',
            'endpoint' => 'schedules',
        ));
        return $this->hydrateObject($result, 'HpsPayPlanSchedule');
    }
1244258
public function index()
    {
        $schedule = Schedule::query();

        if ($sortBy = Binput::get('sort')) {
            $direction = Binput::has('order') && Binput::get('order') == 'desc';

            $schedule->sort($sortBy, $direction);
        }

        $schedule = $schedule->paginate(Binput::get('per_page', 20));

        return $this->paginator($schedule, Request::instance());
    }
882198
public function edit(Order $order)
    {
        Shop::instance($order->shop_id);
        $paymentMethods = Shop::getPaymentMethods()->flatten()->mapWithKeys(function($method) {
            return [$method::getId() => $method::getName()];
        })->all();
        return view('order::admin.orders.edit', compact('order', 'paymentMethods'));
    }
1294897
public function schedule()
    {
        $createdAtTime = $this->getCronTimestamp();
        $scheduledAtTime = $createdAtTime;

        /* @var $schedule Schedule */
        $schedule = $this->scheduleCollection->getNewEmptyItem();
        $schedule->setJobCode(Export::JOB_CODE)
            ->setStatus(Schedule::STATUS_PENDING)
            ->setCreatedAt(strftime('%Y-%m-%d %H:%M:%S', $createdAtTime))
            ->setScheduledAt(strftime('%Y-%m-%d %H:%M', $scheduledAtTime));

        $schedule->save();

        return $schedule;
    }
373934
public function actionSchedulerAdd()
    {
        $model = new Scheduler();
        $model->attributes = Yii::$app->request->bodyParams;

        if (!$model->hasTriggerPermission($model->model_class)) {
            throw new ForbiddenHttpException("Unable to schedule a task for the given model.");
        }

        if ($model->save()) {
            $model->pushQueue();

            // if its a "now" job, run the internal worker now so the log table is refreshed immediately
            Yii::$app->adminqueue->run(false);
            Config::set(Config::CONFIG_QUEUE_TIMESTAMP, time());
            return $model;
        }

        return $this->sendModelError($model);
    }
633926
private function addSchedulesToCalendar($calendar, $schedules)
    {
        $calendar->schedules = $schedules;
        $calendar->schedules->date_times = $this->prepareDateTimes($calendar->schedules->date_times);

        return $calendar;
    }
405783
public function show($id)
    {
        $schedule = $this->client->get(
            sprintf('buckets/%d/schedules/%d.json', $this->bucket, $id)
        );

        return new Schedule($this->response($schedule));
    }
689547
public function destroy(Schedule $schedule)
    {
        try {
            execute(new DeleteScheduleCommand($schedule));
        } catch (QueryException $e) {
            throw new BadRequestHttpException();
        }

        return $this->noContent();
    }
95967
public function edit($id) {
		$dep        = Dep::find($id);
		$department = Dep::where('parent', null)->pluck('name_'.app('l'), 'id');
		return view('admin.department.edit', ['title' => trans('admin.edit'),
				'department'                                => $department,
				'edit'                                      => $dep,
			]);
	}
82232
public function setSchedule($schedule, $options = [])
    {
        $this->schedule = $schedule;
        $this->setOptions($options);

        return $this;
    }
264880
public function scheduleBlastFromTemplate($template, $list, $schedule_time, $options = [ ]) {
        $data = $options;
        $data['copy_template'] = $template;
        $data['list'] = $list;
        $data['schedule_time'] = $schedule_time;
        return $this->apiPost('blast', $data);
    }