当前位置: 首页>>代码示例>>PHP>>正文


PHP TextField::Field方法代码示例

本文整理汇总了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);
 }
开发者ID:prostart,项目名称:erics-homes,代码行数:7,代码来源:SiteTreeURLSegmentField.php

示例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);
 }
开发者ID:ivoba,项目名称:silverstripe-framework,代码行数:7,代码来源:TimeField.php

示例4: Field

 public function Field($properties = array())
 {
     if (Config::inst()->get('MathSpamProtectorField', 'enabled')) {
         return parent::Field($properties);
     }
     return null;
 }
开发者ID:jelicanin,项目名称:silverstripe-mathspamprotection,代码行数:7,代码来源:MathSpamProtectorField.php

示例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);
 }
开发者ID:lekoala,项目名称:silverstripe-form-extras,代码行数:7,代码来源:AccountingField.php

示例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);
 }
开发者ID:fullscreeninteractive,项目名称:silverstripe-addressfinder,代码行数:13,代码来源:AddressFinderField.php

示例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);
 }
开发者ID:reshadf,项目名称:RMProject,代码行数:19,代码来源:class.PassField.php

示例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);
 }
开发者ID:helpfulrobot,项目名称:chitosystems-bootstrap-fields,代码行数:8,代码来源:BootstrapDateTimePickerField.php

示例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);
 }
开发者ID:sheadawson,项目名称:silverstripe-select2,代码行数:9,代码来源:AjaxSelect2Field.php

示例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);
 }
开发者ID:spekulatius,项目名称:silverstripe-bootstrap_extra_fields,代码行数:9,代码来源:BootstrapCaptchaField.php

示例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);
 }
开发者ID:helpfulrobot,项目名称:phs-silverstripe-spectrum-colorpicker,代码行数:9,代码来源:ColorpickerField.php

示例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>';
 }
开发者ID:SustainableCoastlines,项目名称:loveyourwater,代码行数:15,代码来源:AutoCompleteField.php

示例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);
 }
开发者ID:SpiritLevel,项目名称:silverstripe-framework,代码行数:9,代码来源:CreditCardField.php

示例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);
 }
开发者ID:silverstripe-terraformers,项目名称:silverstripe-youtubefield,代码行数:9,代码来源:YouTubeField.php


注:本文中的TextField::Field方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。