本文整理汇总了PHP中TextField::Field方法的典型用法代码示例。如果您正苦于以下问题:PHP TextField::Field方法的具体用法?PHP TextField::Field怎么用?PHP TextField::Field使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextField
的用法示例。
在下文中一共展示了TextField::Field方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Field
public function Field($properties = array())
{
Requirements::javascript(CMS_DIR . '/javascript/SiteTreeURLSegmentField.js');
Requirements::add_i18n_javascript(CMS_DIR . '/javascript/lang', false, true);
Requirements::css(CMS_DIR . "/css/screen.css");
return parent::Field($properties);
}
示例2: Field
public function Field($properties = array())
{
Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.min.js');
Requirements::javascript('bootstrap_extra_fields/javascript/moment.min.js');
Requirements::javascript('bootstrap_extra_fields/javascript/bootstrap-datetimepicker.min.js');
Requirements::css('bootstrap_extra_fields/css/bootstrap-datetimepicker.min.css');
$language = '';
if (array_key_exists(i18n::get_locale(), $this->supported_locales)) {
Requirements::javascript('bootstrap_extra_fields/javascript/locales/bootstrap-datetimepicker.' . $this->supported_locales[i18n::get_locale()] . '.js');
$language = "language: '{$this->supported_locales[i18n::get_locale()]}'";
} else {
if ($this->locale) {
Requirements::javascript('bootstrap_extra_fields/javascript/locales/bootstrap-datetimepicker.' . $this->locale . '.js');
$language = "language: '{$this->locale}'";
}
}
$name = $this->ID();
// set caption if required
$js = <<<JS
\$(function () {
\$('#{$name}').datetimepicker({{$language}});
});
JS;
Requirements::customScript($js, 'BootstrapDatetimepickerForm_Js_' . $this->ID());
return parent::Field($properties);
}
开发者ID:EduardMa,项目名称:silverstripe-bootstrap_extra_fields,代码行数:26,代码来源:BootstrapDatetimepickerField.php
示例3: Field
public function Field($properties = array())
{
$config = array('timeformat' => $this->getConfig('timeformat'));
$config = array_filter($config);
$this->addExtraClass(Convert::raw2json($config));
return parent::Field($properties);
}
示例4: Field
public function Field($properties = array())
{
if (Config::inst()->get('MathSpamProtectorField', 'enabled')) {
return parent::Field($properties);
}
return null;
}
示例5: Field
public function Field($properties = array())
{
FormExtraJquery::include_jquery();
FormExtraJquery::include_accounting();
Requirements::javascript(FORM_EXTRAS_PATH . '/javascript/AccountingField.js');
return parent::Field($properties);
}
示例6: FieldHolder
/**
* @param array $properties
*
* @return string
*/
public function FieldHolder($properties = array())
{
Requirements::javascript('//www.addressfinder.co.nz/assets/v2/widget.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::javascript('addressfinder/javascript/addressfinder.js');
$properties = array('ApiKey' => Config::inst()->get('AddressFinder', 'api_key'), 'ManualAddressFields' => $this->getManualFields(), 'AddressField' => $this->addressField->Field(), 'ManualToggleField' => $this->manualToggle);
return parent::FieldHolder($properties);
}
示例7: PassField
/**
* PassField::PassField()
*
* Constructor: Create a new passfield object
*
* @param object $oForm: The form where the field is located on
* @param string $sName: The name of the form
* @return PassField
* @author Teye Heimans
* @access public
*/
function PassField(&$oForm, $sName)
{
// call the constructor of the Field class
parent::Field($oForm, $sName);
$this->_sPre = '';
$this->setSize(20);
$this->setMaxlength(0);
}
示例8: Field
public function Field($properties = array())
{
Requirements::javascript(BOOTSTRAP_FIELDS_BOWER_DIR . "/moment/min/moment.min.js");
Requirements::javascript(DATETIMEPICKER_DIR . "/js/bootstrap-datetimepicker.min.js");
Requirements::javascript(BOOTSTRAP_FIELDS__DIR . "/js/BootstrapDateField.js");
Requirements::css(DATETIMEPICKER_DIR . "/css/bootstrap-datetimepicker.min.css");
return parent::Field($properties);
}
示例9: Field
public function Field($properties = array())
{
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery-entwine/dist/jquery.entwine-dist.js');
Requirements::javascript(SELECT2_MODULE . "/select2/select2.js");
Requirements::javascript(SELECT2_MODULE . '/javascript/ajaxselect2.init.js');
Requirements::css(SELECT2_MODULE . "/select2/select2.min.css");
return parent::Field($properties);
}
示例10: Field
public function Field($properties = array())
{
// Fetch the Field Record
$CaptchaValue = $this->GenerateString();
Session::set('BootstrapCaptchaFieldValue', $CaptchaValue);
$ImageSrc = $this->GenerateImage($CaptchaValue);
$properties = array_merge($properties, array('ImageSrc' => $ImageSrc));
return parent::Field($properties);
}
示例11: Field
public function Field($properties = array())
{
$this->addExtraClass('spectrum-colorpickerfield');
Requirements::css(SPECTRUM_COLORPICKER_DIR . '/bower_components/spectrum/spectrum.css');
Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js');
Requirements::javascript(SPECTRUM_COLORPICKER_DIR . '/bower_components/spectrum/spectrum.js');
Requirements::javascript(SPECTRUM_COLORPICKER_DIR . '/javascript/colorpicker.js');
return parent::Field($properties);
}
示例12: getColumnContent
/**
* HTML for the column, content of the <td> element.
*
* @param GridField $gridField
* @param DataObject $record - Record displayed in this row
* @param string $columnName
* @return string - HTML for the column. Return NULL to skip.
*/
public function getColumnContent($gridField, $record, $columnName)
{
$field = new TextField('MetaTitle');
$value = $gridField->getDataFieldValue($record, $columnName);
$value = $this->formatValue($gridField, $record, $columnName, $value);
$field->setName($this->getFieldName($field->getName(), $gridField, $record));
$field->setValue($value);
return $field->Field() . $this->getErrorMessages();
}
开发者ID:helpfulrobot,项目名称:littlegiant-silverstripe-seo-editor,代码行数:17,代码来源:SEOEditorMetaTitleColumn.php
示例13: Field
/**
* Require the dependencies and render the field
* Note: The wrapper div is a hack. Position:relative would not work against
* an input field in most browsers. :-(
* @return string
*/
public function Field()
{
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery-metadata/jquery.metadata.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery-livequery/jquery.livequery.js');
Requirements::javascript('dataobject_manager/code/autocomplete_field/javascript/autocomplete_field.js');
Requirements::css('dataobject_manager/code/autocomplete_field/css/autocomplete_field.css');
return '<div class="autocomplete_holder">' . parent::Field() . '<div class="autocomplete_results"></div></div>';
}
示例14: Field
public function Field($properties = array())
{
$parts = $this->arrayValue();
$properties['ValueOne'] = $parts[0];
$properties['ValueTwo'] = $parts[1];
$properties['ValueThree'] = $parts[2];
$properties['ValueFour'] = $parts[3];
return parent::Field($properties);
}
示例15: Field
public function Field($properties = array())
{
if ($api_key = $this->config()->get('api_key')) {
$this->setAttribute('data-apikey', $api_key);
Requirements::javascript(SS_YOUTUBEFIELD_DIRECTORY . '/javascript/YouTubeField.js');
Requirements::javascript('https://apis.google.com/js/client.js?onload=googleApiClientReady');
}
return parent::Field($properties);
}