本文整理匯總了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;
}