/** * buildInput * * @param array $attrs * * @return string */ public function buildInput($attrs) { // Convert timezone $from = $this->get('from', 'UTC'); $to = $this->get('to', Ioc::getConfig()->get('system.timezone', 'UTC')); if ($attrs['value'] && $attrs['value'] != static::EMPTY_DATETIME) { $attrs['value'] = DateTime::convert($attrs['value'], $from, $to); } $input = parent::buildInput($attrs); $format = $this->get('format', 'YYYY-MM-DD HH:mm:ss'); $id = $this->getId(); return WidgetHelper::render('phoenix.form.field.calendar', array('id' => $id, 'input' => $input, 'attrs' => $attrs, 'format' => $format, 'field' => $this), WidgetHelper::EDGE); }
/** * renderSpacer * * @param AbstractField $field * @param array $attribs * * @return string */ public static function renderSpacer(AbstractField $field, array $attribs = []) { return WidgetHelper::render(static::getTemplatePrefix() . 'field.spacer', array('attribs' => $attribs, 'field' => $field), WidgetHelper::EDGE); }
</ul> </div> <!--/.nav-collapse --> </div> </div> <?php $this->endblock(); ?> <?php $this->block('message'); ?> <div id="messasge" class="container"> <?php echo \Windwalker\Core\Widget\WidgetHelper::render('windwalker.message.default', array('flashes' => $data->flashes)); ?> </div> <?php $this->endblock(); ?> <?php $this->block('content'); ?> Contnet <?php $this->endblock(); ?> <?php
/** * buildInput * * @param array $attrs * * @return string */ public function buildInput($attrs) { $this->prepareScript(); $this->package = $this->package ?: $this->get('package'); $this->view = $this->view ?: $this->get('view'); $attribs = $attrs; /** @var HtmlElement $input */ $input = parent::buildInput($attribs); $input['type'] = 'hidden'; $input['data-value-store'] = true; $url = $this->get('url') ?: $this->getUrl(); $id = $this->getId(); return WidgetHelper::render('phoenix.form.field.modal', array('id' => $id, 'title' => $this->getTitle(), 'input' => $input, 'url' => $url, 'attrs' => $attrs, 'field' => $this), WidgetHelper::EDGE); }
/** * render * * @param mixed $value * @param integer $row * * @return string */ public function render($value = null, $row = null) { $default = $this->getState($value); $default = $default ?: $this->getState('_default'); $default = array_merge($default, $this->options); $default['row'] = (int) $row; return WidgetHelper::render($this->template, $default, WidgetHelper::EDGE); }
/** * Checkbox input. * * @return string Checkbox html code. */ public function checkbox() { $keyName = $this->config->get('field.pk'); return WidgetHelper::render('phoenix.grid.table.checkbox', array('keyName' => $keyName, 'item' => $this->current, 'row' => $this->row), WidgetHelper::EDGE); }
/** * buildInput * * @param array $attrs * * @return mixed */ public function buildInput($attrs) { $this->prepareScript($attrs); return WidgetHelper::render('unidev.form.field.single-drag-image', ['attrs' => $attrs, 'defaultImage' => $this->get('default_image')], WidgetHelper::EDGE); }