Exemplo n.º 1
0
 /**
  * handleFilterBar
  *
  * @param   Data  $data
  *
  * @return  void
  */
 protected function handleFilterBar(Data $data)
 {
     // Widget
     $data->filterBar = $data->filterBar ?: WidgetHelper::createWidget('phoenix.grid.filterbar', 'edge', $this->package);
     $data->showFilterBar = false;
     // Handler filter bar
     foreach ((array) $data->state->get('input.filter') as $value) {
         if ($value !== '' && $value !== null) {
             $data->showFilterBar = true;
             break;
         }
     }
 }
Exemplo n.º 2
0
 /**
  * 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);
 }
Exemplo n.º 3
0
 /**
  * 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);
 }
Exemplo n.º 4
0
			</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 
Exemplo n.º 5
0
 /**
  * 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);
 }
Exemplo n.º 6
0
 /**
  * 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);
 }
Exemplo n.º 7
0
 /**
  * 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);
 }
Exemplo n.º 8
0
 /**
  * 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);
 }