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


PHP TextEdit::SetPrefix方法代码示例

本文整理汇总了PHP中TextEdit::SetPrefix方法的典型用法代码示例。如果您正苦于以下问题:PHP TextEdit::SetPrefix方法的具体用法?PHP TextEdit::SetPrefix怎么用?PHP TextEdit::SetPrefix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TextEdit的用法示例。


在下文中一共展示了TextEdit::SetPrefix方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: AddInsertColumns


//.........这里部分代码省略.........
     $field->SetIsNotNull(true);
     $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);
     //
开发者ID:CivicInfoBC,项目名称:workplan.gov_ver_1.19,代码行数:67,代码来源:project.php

示例2: 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');
//.........这里部分代码省略.........
开发者ID:BCDevExchange,项目名称:WORKPLAN,代码行数:101,代码来源:project.php


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