本文整理汇总了PHP中TextEdit::SetSuffix方法的典型用法代码示例。如果您正苦于以下问题:PHP TextEdit::SetSuffix方法的具体用法?PHP TextEdit::SetSuffix怎么用?PHP TextEdit::SetSuffix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextEdit
的用法示例。
在下文中一共展示了TextEdit::SetSuffix方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for lis-codart field
//
$editor = new AutocomleteComboBox('lis-codart_edit', $this->CreateLinkBuilder());
$editor->SetSize('350px');
$editor->setAllowClear(true);
$editor->setMinimumInputLength(0);
$lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`elenco_articoli_view`');
$field = new StringField('art-codart');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('descrizione');
$lookupDataset->AddField($field, false);
$lookupDataset->setOrderByField('descrizione', GetOrderTypeAsSQL(otAscending));
$editColumn = new DynamicLookupEditColumn('Codice Articolo', 'lis-codart', 'lis-codart_descrizione', 'insert_lis-codart_descrizione_search', $editor, $this->dataset, $lookupDataset, 'art-codart', 'descrizione', '');
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for lisdesc field
//
$editor = new TextEdit('lisdesc_edit');
$editor->SetSize(100);
$editColumn = new CustomEditColumn('Descrizione', 'lisdesc', $editor, $this->dataset);
$editColumn->SetReadOnly(true);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for lis-unimis field
//
$editor = new ComboBox('lis-unimis_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editor->AddValue('N', $this->RenderText('Nessuna'));
$editor->AddValue('LT', $this->RenderText('Litri'));
$editor->AddValue('KG', $this->RenderText('Chili'));
$editor->AddValue('CF', $this->RenderText('Confezione'));
$editor->AddValue('MC', $this->RenderText('Metri cubi'));
$editor->AddValue('MT', $this->RenderText('Metri'));
$editColumn = new CustomEditColumn('Unità misura', 'lis-unimis', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for lis-przacq field
//
$editor = new TextEdit('lis-przacq_edit');
$editColumn = new CustomEditColumn('Prezzo acquisto', 'lis-przacq', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('0'));
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for lis-moltipl field
//
$editor = new TextEdit('lis-moltipl_edit');
$editColumn = new CustomEditColumn('Moltiplicatore', 'lis-moltipl', $editor, $this->dataset);
$editColumn->SetReadOnly(true);
$editColumn->SetInsertDefaultValue($this->RenderText('5'));
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for lis-oneriacc field
//
$editor = new TextEdit('lis-oneriacc_edit');
$editor->SetSuffix($this->RenderText('%'));
$editColumn = new CustomEditColumn('Oneri e accessori', 'lis-oneriacc', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('0'));
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for lis-scarto field
//
$editor = new TextEdit('lis-scarto_edit');
$editor->SetSuffix($this->RenderText('%'));
$editColumn = new CustomEditColumn('Scarto', 'lis-scarto', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('0'));
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for lis-dataini field
//
$editor = new DateTimeEdit('lis-dataini_edit', false, 'd-m-Y', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Data inizio decorrenza', 'lis-dataini', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_DATETIME%'));
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for lis-datafin field
//.........这里部分代码省略.........
示例2: AddInsertColumns
//.........这里部分代码省略.........
$lookupDataset->AddField($field, false);
$field = new StringField('email');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('picture');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('password');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new IntegerField('dept_id');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('position');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('emp_number');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$lookupDataset->SetOrderBy('username', GetOrderTypeAsSQL(otAscending));
$editColumn = new LookUpEditColumn('Project Lead', 'lead', $editor, $this->dataset, 'staff_id', 'username', $lookupDataset);
$editColumn->SetCaptionTemplate($this->RenderText('%username%'));
$editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_USER_ID%'));
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for approved_budget field
//
$editor = new TextEdit('approved_budget_edit');
$editor->SetPlaceholder($this->RenderText('currency value without comma'));
$editor->SetPrefix($this->RenderText('$'));
$editor->SetSuffix($this->RenderText('.00'));
$editColumn = new CustomEditColumn('Approved Budget', 'approved_budget', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('0'));
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$validator = new CustomRegExpValidator('^[0-9]*$', StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RegExpValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for budget_spent field
//
$editor = new TextEdit('budget_spent_edit');
$editor->SetPlaceholder($this->RenderText('currency value without comma'));
$editor->SetPrefix($this->RenderText('$'));
$editor->SetSuffix($this->RenderText('.00'));
$editColumn = new CustomEditColumn('Budget Spent', 'budget_spent', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$editColumn->SetInsertDefaultValue($this->RenderText('0'));
$validator = new CustomRegExpValidator('^[0-9]*$', StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RegExpValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for multi_year field
//
$editor = new CheckBox('multi_year_edit');
$editColumn = new CustomEditColumn('Multi Year', 'multi_year', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for public_engagement field
示例3: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for programm_id field
//
$editor = new ComboBox('programm_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editColumn = new CustomEditColumn('Project Type', 'programm_id', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for project_name field
//
$editor = new TextEdit('project_name_edit');
$editColumn = new CustomEditColumn('Project Name', 'project_name', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$validator = new CustomRegExpValidator('^[A-Za-z0-9 ()&]+[-]*[A-Za-z0-9 ()&]*$', StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RegExpValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for date_start field
//
$editor = new DateTimeEdit('date_start_edit', false, 'Y-m-d', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Date Start', 'date_start', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_DATE%'));
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for date_end field
//
$editor = new DateTimeEdit('date_end_edit', true, 'Y-m-d', GetFirstDayOfWeek());
$editColumn = new CustomEditColumn('Date End', 'date_end', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_DATE%'));
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for year field
//
$editor = new TextEdit('year_edit');
$editColumn = new CustomEditColumn('Year', 'year', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('2016'));
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$validator = new NumberValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('NumberValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for notes field
//
$editor = new TextAreaEdit('notes_edit', 50, 8);
$editColumn = new CustomEditColumn('Objectives', 'notes', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for priority field
//
$editor = new ComboBox('priority_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editColumn = new CustomEditColumn('Priority', 'priority', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for lead field
//
$editor = new ComboBox('lead_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editColumn = new CustomEditColumn('Project Lead', 'lead', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('%CURRENT_USER_ID%'));
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for approved_budget field
//
$editor = new TextEdit('approved_budget_edit');
$editor->SetPlaceholder($this->RenderText('currency value without comma'));
$editor->SetPrefix($this->RenderText('$'));
$editor->SetSuffix($this->RenderText('.00'));
$editColumn = new CustomEditColumn('Approved Budget', 'approved_budget', $editor, $this->dataset);
$editColumn->SetInsertDefaultValue($this->RenderText('0'));
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$validator = new NumberValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('NumberValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for budget_spent field
//
$editor = new TextEdit('budget_spent_edit');
//.........这里部分代码省略.........