本文整理汇总了PHP中TextField::input方法的典型用法代码示例。如果您正苦于以下问题:PHP TextField::input方法的具体用法?PHP TextField::input怎么用?PHP TextField::input使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextField
的用法示例。
在下文中一共展示了TextField::input方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: input
public function input()
{
# Use `BaseField`'s setup
$input = parent::input();
# Provide a hook for the Panel's form initialization. This is a jQuery method, defined in assets/js/place.js
$input->data('field', 'mapField');
return $input;
}
示例2: input
public function input()
{
$input = parent::input();
if ($this->suggestion) {
$input->data(array('field' => 'passwordSuggestion'));
}
return $input;
}
示例3: input
public function input()
{
$input = parent::input();
if ($this->autocomplete) {
$input->attr('autocomplete', 'off');
$input->data(array('field' => 'autocomplete', 'url' => panel()->urls()->api() . '/autocomplete/emails?_csrf=' . panel()->csrf()));
}
return $input;
}
示例4: input
public function input()
{
$input = parent::input();
$input->tag('textarea');
$input->removeAttr('type');
$input->removeAttr('value');
$input->html($this->value() ? htmlentities($this->value(), ENT_NOQUOTES, 'UTF-8') : false);
$input->data('field', 'editor');
return $input;
}
示例5: input
public function input()
{
$input = parent::input();
$input->tag('textarea');
$input->removeAttr('type');
$input->removeAttr('value');
$input->html($this->value() ?: false);
$input->data('field', 'editor');
return $input;
}
示例6: input
public function input()
{
$input = parent::input();
$input->addClass('input-with-tags');
$input->data(array('field' => 'tags', 'lowercase' => $this->lower, 'separator' => $this->separator));
if ($page = $this->page()) {
$query = array('uri' => $page->id(), 'index' => $this->index(), 'field' => $this->field(), 'separator' => $this->separator());
$input->data('url', url('panel/api/autocomplete/field?' . http_build_query($query)));
}
return $input;
}
示例7: input
public function input()
{
$input = parent::input();
$input->addClass('input-with-tags');
$input->data(array('field' => 'tags', 'lowercase' => $this->lower, 'separator' => $this->separator));
if (isset($this->data)) {
$input->data('url', html(json_encode($this->data), false));
} else {
if ($page = $this->page()) {
$query = array('uri' => $page->id(), 'index' => $this->index(), 'field' => $this->name(), 'separator' => $this->separator());
$input->data('url', panel()->urls()->api() . '/autocomplete/field?' . http_build_query($query));
}
}
return $input;
}
示例8: input
public function input()
{
$input = parent::input();
$input->addClass('input-with-tags');
$input->data(array('field' => 'tags', 'lowercase' => $this->lower ? 'true' : false, 'separator' => $this->separator));
if (isset($this->data)) {
$input->data('url', html(json_encode($this->data), false));
} else {
if ($page = $this->page()) {
$field = empty($this->field) ? $this->name() : $this->field;
$model = is_a($this->model, 'File') ? 'file' : 'page';
$query = array('uri' => $page->id(), 'index' => $this->index(), 'field' => $field, 'yaml' => $this->parentField, 'model' => $model, 'separator' => $this->separator(), '_csrf' => panel()->csrf());
$input->data('url', panel()->urls()->api() . '/autocomplete/field?' . http_build_query($query));
}
}
return $input;
}
示例9: input
public function input()
{
$input = parent::input();
$input->data(array('field' => 'autocomplete', 'url' => panel()->urls()->api() . '/autocomplete/uris'));
return $input;
}
示例10: input
public function input()
{
$input = parent::input();
$input->data('field', 'urlfield');
return $input;
}