當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。