Builds datetime picker action structure.

@return array Built datetime picker action structure.
426429
public function buildTemplateAction()
    {
        return [
            'type' => ActionType::DATETIME_PICKER,
            'label' => $this->label,
            'data' => $this->data,
            'mode' => $this->mode,
            'initial' => $this->initial,
            'max' => $this->max,
            'min' => $this->min,
        ];
    }
74092
public function buildTemplateAction()
    {
        $action = [
            'type' => ActionType::POSTBACK,
            'label' => $this->label,
            'data' => $this->data,
        ];

        if (isset($this->displayText)) {
            // If text is set, append extend field.
            $action['displayText'] = $this->displayText;
        }

        return $action;
    }
505567
private function recomputeStartDateTime(): \DateTimeImmutable
    {
        $this->startDateTime = null;
        foreach ($this->trackPoints() as $trackPoint) {
            if ($this->startDateTime === null || $this->startDateTime > $trackPoint->dateTime()) {
                $this->startDateTime = clone $trackPoint->dateTime();
            }
        }

        return $this->startDateTime;
    }
44459
public function actionDataMenu()
    {
        return [
            'items' => ArrayHelper::typeCast(MenuHelper::getItems()),
            'drafts' => ArrayHelper::typeCast(MenuHelper::getDrafts()),
            'containers' => ArrayHelper::typeCast(MenuHelper::getContainers()),
            'hiddenCats' => ArrayHelper::typeCast(Yii::$app->adminuser->identity->setting->get("togglecat", [])),
        ];
    }
932857
public function completed_at_datetimepicker()
    {
        if ($this->wrappedObject->completed_at) {
            return $this->dates->make($this->wrappedObject->completed_at)->format('Y-m-d H:i');
        }
    }
582738
public function getTotalTime()
    {
        if (null === $this->totalTime) {
            $this->totalTime = 0;
            foreach ($this->data['actions'] as $action) {
                if (isset($action['time'])) {
                    $this->totalTime += $action['time'];
                }
            }
            foreach ($this->data['applicableCheckers'] as $applicableChecker) {
                if (isset($applicableChecker['time'])) {
                    $this->totalTime += $applicableChecker['time'];
                }
            }
        }

        return $this->totalTime;
    }
460488
public function getJsonValue()
    {
        $return = [];
        foreach ($this->getParts() as $item) {
            list($start, $end) = explode('/', $item, 2);

            $start = DateTimeParser::parseDateTime($start);

            // This is a duration value.
            if ('P' === $end[0]) {
                $return[] = [
                    $start->format('Y-m-d\\TH:i:s'),
                    $end,
                ];
            } else {
                $end = DateTimeParser::parseDateTime($end);
                $return[] = [
                    $start->format('Y-m-d\\TH:i:s'),
                    $end->format('Y-m-d\\TH:i:s'),
                ];
            }
        }

        return $return;
    }
1269212
private function getDateTimeType(): Type
    {
        if ($this->dateTimeType === null) {
            $this->dateTimeType = Type::getType(DateTimeType::DATETIME);
        }

        return $this->dateTimeType;
    }
1165579
public static function buildInTypes(): array
    {
        if (null === self::$buildInParamBroker) {
            self::$buildInParamBroker = [
                    'array'          => new param\ArrayParamBroker(),
                    'bool'           => new param\BoolParamBroker(),
                    'customdatespan' => new param\CustomDatespanParamBroker(),
                    'date'           => new param\DateParamBroker(),
                    'datespan'       => new param\DatespanParamBroker(),
                    'day'            => new param\DayParamBroker(),
                    'float'          => new param\FloatParamBroker(),
                    'httpuri'        => new param\HttpUriParamBroker(),
                    'integer'        => new param\IntegerParamBroker(),
                    'json'           => new param\JsonParamBroker(),
                    'mail'           => new param\MailParamBroker(),
                    'month'          => new param\MonthParamBroker(),
                    'oneof'          => new param\OneOfParamBroker(),
                    'password'       => new param\PasswordParamBroker(),
                    'string'         => new param\StringParamBroker(),
                    'secret'         => new param\SecretParamBroker(),
                    'text'           => new param\TextParamBroker(),
                    'week'           => new param\WeekParamBroker(),
                ];
        }

        return self::$buildInParamBroker;
    }
552711
public function toSoapRequestArray(): array
	{
		$configArray = $this->configArray();
		$data = parent::toArray();
		$withConfig = array_merge($configArray, $data);

		return DateTimeDeflater::processWithPaths(
			$withConfig,
			static::$dateTimePaths
		);
	}
571954
public function getDates()
    {
        $defaults = [static::CREATED_AT, static::UPDATED_AT];

        return $this->timestamps ? array_merge($this->dates, $defaults) : $this->dates;
    }
488845
protected function getCustomDateTimeFunctions()
    {
        $functions = (array) $this->getOption('custom_datetime_functions');

        return array_filter(
            $functions,
            function ($name) {
                return is_string($name);
            },
            ARRAY_FILTER_USE_KEY
        );
    }
418029
public function datetimePicker()
    {
        $this->element = Angular::datetime('{model}', '{label}', [
            'fieldid' => $this->form->getFieldId($this->attribute),
            'ng-init' => '{initValue}',
        ]);

        return $this;
    }
947831
public function actionList()
    {
        $this->importScheduleFile();

        $climate = new CLImate();
        $data = [];
        $row = 0;

        foreach ($this->schedule->getEvents() as $event) {
            $data[] = [
                '#' => ++$row,
                'Task' => $event->getSummaryForDisplay(),
                'Expression' => $event->getExpression(),
                'Command to Run' => is_a($event, CallbackEvent::class)
                    ? $event->getSummaryForDisplay()
                    : $event->command,
                'Next run at' => $this->getNextRunDate($event),
            ];
        }

        $climate->table($data);
    }
968721
protected function _formatters() {
		$datetime = $timestamp = function($format, $value) {
			if ($format && (($time = strtotime($value)) !== false)) {
				$val = date($format, $time);
				if (!preg_match('/^' . preg_quote($val) . '\.\d+$/', $value)) {
					$value = $val;
				}
			}
			return $this->connection->quote($value);
		};

		return compact('datetime', 'timestamp') + [
			'boolean' => function($value) {
				return $this->connection->quote($value ? 't' : 'f');
			}
		] + parent::_formatters();
	}
912746
public function actionEvents()
    {
        Yii::$app->response->format = Response::FORMAT_JSON;
        $result = ($post = Yii::$app->request->post('depdrop_parents'))
            ? array_flip(ClassCrawler::getEventNames($post[0]))
            : [];
        $output = [];
        foreach ($result as $id => $name) {
            $output[] = compact('id', 'name');
        }
        echo Json::encode(['output' => $output, 'selected' => '']);
    }
123850
protected function buildIntervalSelect()
    {
        $interval = Yii::t('hipanel', 'Interval');

        $html = <<<HTML
<button type="button" class="btn btn-sm" id="{$this->getId()}-period-btn">
    <i class="fa fa-calendar"></i>
    <span data-prompt="$interval">$interval</span>
    <i class="fa fa-caret-down"></i>
</button>
HTML;
        $pickerOptions = $this->pickerOptions;
        $class = ArrayHelper::remove($pickerOptions, 'class');

        $html .= $class::widget($pickerOptions);

        return $html;
    }