本文整理汇总了PHP中TextField::FieldHolder方法的典型用法代码示例。如果您正苦于以下问题:PHP TextField::FieldHolder方法的具体用法?PHP TextField::FieldHolder怎么用?PHP TextField::FieldHolder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextField
的用法示例。
在下文中一共展示了TextField::FieldHolder方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: FieldHolder
public function FieldHolder($properties = array())
{
if (Config::inst()->get('MathSpamProtectorField', 'enabled')) {
return parent::FieldHolder($properties);
}
return null;
}
示例2: FieldHolder
function FieldHolder()
{
// TODO Replace with properly extensible view helper system
$d = Object::create('DateField_View_JQuery', $this);
$d->onBeforeRender();
$html = parent::FieldHolder();
$html = $d->onAfterRender($html);
return $html;
}
示例3: FieldHolder
public function FieldHolder($properties = array())
{
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css');
Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-ui/jquery-ui.js');
Requirements::javascript('latlongfield/javascript/jquery.locationpicker.js');
Requirements::javascript('latlongfield/javascript/latlongfield.js');
Requirements::css('latlongfield/css/latlongfield.css');
return parent::FieldHolder($properties = array());
}
示例4: FieldHolder
public function FieldHolder($properties = array())
{
// load requirements
Requirements::css('international-phone-number-field/lib/intl-tel-input/build/css/intlTelInput.css');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.min.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery-validate/jquery.validate.min.js');
Requirements::combine_files('InternationalPhoneNumberField.js', array('international-phone-number-field/lib/intl-tel-input/build/js/intlTelInput.min.js', 'international-phone-number-field/javascript/init.js'));
// call parent
$html = parent::FieldHolder();
return $html;
}
开发者ID:helpfulrobot,项目名称:xini-silverstripe-international-phone-number-field,代码行数:11,代码来源:InternationalPhoneNumberField.php
示例5: FieldHolder
function FieldHolder()
{
$holder = parent::FieldHolder();
$id = $this->id();
$holder .= <<<JS
\t\t\t<script type="text/javascript">
\t\t\t\tnew Ajax.Autocompleter( '{$id}', '{$id}_Options', '{$this->optionsURL}', { afterUpdateElement : function(el) { if(el.onajaxupdate) { el.onajaxupdate(); } } } );
\t\t\t</script>
JS;
return $holder;
}
示例6: FieldHolder
public function FieldHolder($properties = array())
{
// load requirements
Requirements::css('international-phone-number-field/lib/intl-tel-input/build/css/intlTelInput.css');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.min.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery-validate/jquery.validate.min.js');
Requirements::javascript('international-phone-number-field/lib/intl-tel-input/build/js/intlTelInput.min.js');
$token = Config::inst()->get('InternationalPhoneNumberField', 'ipinfo_access_token');
$tokenParameter = $token && strlen($token) > 0 ? '?token=' . $token : '';
$protocol = $token && strlen($token) > 0 ? 'https' : 'http';
Requirements::javascriptTemplate('international-phone-number-field/javascript/InternationalPhoneNumberField.js', array('TokenParameter' => $tokenParameter, 'Protocol' => $protocol));
// call parent
$html = parent::FieldHolder();
return $html;
}
开发者ID:xini,项目名称:silverstripe-international-phone-number-field,代码行数:15,代码来源:InternationalPhoneNumberField.php
示例7: testForTemplate
/**
* FieldList::forTemplate() returns a concatenation of FieldHolder values.
*/
public function testForTemplate()
{
$set = new FieldList($a = new TextField('A'), $b = new TextField('B'));
$this->assertEquals($a->FieldHolder() . $b->FieldHolder(), $set->forTemplate());
}
示例8: 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);
}
示例9: FieldHolder
/**
* Return field holder to the form
**/
public function FieldHolder($properties = array())
{
return parent::FieldHolder($properties);
}
示例10: FieldHolder
public function FieldHolder($properties = array())
{
if ($this->getConfig('showcalendar')) {
// TODO Replace with properly extensible view helper system
$d = DateField_View_JQuery::create($this);
if (!$d->regionalSettingsExist()) {
$dateformat = $this->getConfig('dateformat');
// if no localefile is present, the jQuery DatePicker
// month- and daynames will default to English, so the date
// will not pass Zend validatiobn. We provide a fallback
if (preg_match('/(MMM+)|(EEE+)/', $dateformat)) {
$this->setConfig('dateformat', $this->getConfig('datavalueformat'));
}
}
$d->onBeforeRender();
}
$html = parent::FieldHolder();
if (!empty($d)) {
$html = $d->onAfterRender($html);
}
return $html;
}
示例11: FieldHolder
public function FieldHolder()
{
$html = "<div class=\"display_anything_field upload_anything_field\">";
$id = $this->controller->{$this->name}()->getField('ID');
$migrated_value = $this->controller->{$this->name}()->getField('Migrated');
$migrator = FALSE;
if ($this->detect_image_gallery_module && $migrated_value == 0) {
//display only if we want to detect imagegallery albums and it's not already migrated
$list = $this->ImageGalleryAlbums();
if (!empty($list)) {
$migrator = TRUE;
$html .= "<div class=\"field_content migrate\">";
$html .= "<fieldset><h5>Display Anything has detected an ImageGallery album associated with this page</h5>";
$html .= "<p>Do you wish to migrate it to your new gallery?<p>";
$html .= "<p>Migration notes:</p><ul>";
$html .= "<li>The original ImageGallery album will remain untouched.</li>";
$html .= "<li>Files will be copied alongside current files, this will allow you to remove the old gallery as and when required.</li>";
$html .= "</ul>";
$migrate = new DropDownField("{$this->name}[{$id}][MigrateImageGalleryAlbumID]", "Choose an album to migrate images from", $list, '', NULL, '[Do not migrate]');
$html .= $migrate->FieldHolder();
$html .= "</fieldset>";
$html .= "</div>";
}
} else {
if ($migrated_value == 1) {
$migrator = TRUE;
}
}
$html .= "<div class=\"field_content\">";
$html .= "<fieldset><h5>Gallery settings and options</h5>";
$title = new TextField("{$this->name}[{$id}][Title]", "Title", $this->controller->{$this->name}()->getField('Title'));
$html .= $title->FieldHolder();
$description = new TextareaField("{$this->name}[{$id}][Description]", "Description", 3, NULL, $this->controller->{$this->name}()->getField('Description'));
$html .= $description->FieldHolder();
$visible = new CheckboxField("{$this->name}[{$id}][Visible]", "Publicly Visible", $this->controller->{$this->name}()->getField('Visible') == 1 ? TRUE : FALSE);
$html .= $visible->FieldHolder();
if ($migrator && $migrated_value == 1) {
//only need to show this post migration
$migrated = new CheckboxField("{$this->name}[{$id}][Migrated]", "Image Gallery migration complete (uncheck and save to display migration options)", TRUE);
$html .= $migrated->FieldHolder();
}
$html .= "</fieldset></div>";
$html .= "<div class=\"field_content\">";
$html .= "<fieldset><h5>Gallery Items</h5>";
if (!empty($id)) {
$html .= parent::FieldHolder();
} else {
$html .= "<div class=\"message\"><p>Gallery items can be uploaded after the gallery is saved for the first time</p></div>";
}
$html .= "</fieldset></div>";
$html .= "</div>";
return $html;
}
示例12: FieldHolder
public function FieldHolder($properties = array())
{
// TODO Replace with properly extensible view helper system
$d = DateField_View_JQuery::create($this);
$d->onBeforeRender();
$html = parent::FieldHolder();
$html = $d->onAfterRender($html);
return $html;
}
示例13: SearchField
function SearchField()
{
$field = new TextField('MemberListSearch', _t('MemberList.SEARCH', 'Search'));
return $field->FieldHolder();
}