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


PHP StringUtils::Format方法代码示例

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


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

示例1: GetAsString

 public function GetAsString()
 {
     $result = '';
     foreach ($this->attributeValues as $name => $value) {
         StringUtils::AddStr($result, StringUtils::Format('%s="%s"', $name, $value), ' ');
     }
     return $result;
 }
开发者ID:martinw0102,项目名称:ProjetSyst,代码行数:8,代码来源:html_utils.php

示例2: GetValue

 public function GetValue()
 {
     $fieldValue = $this->GetDataset()->GetFieldValueByName($this->fieldName);
     if ($fieldValue == null) {
         return '<em class="pgui-null-value">NULL</em>';
     } else {
         return StringUtils::Format('<i class="icon-download"></i>&nbsp;' . '<a target="_blank" title="%s" href="%s">%s</a>', FormatDatasetFieldsTemplate($this->dataset, $this->downloadLinkHintTemplate), $this->sourcePrefix . $fieldValue . $this->sourceSuffix, $this->captions->GetMessageString('Download'));
     }
 }
开发者ID:outsourcinggithub,项目名称:outsourcing,代码行数:9,代码来源:download_external_data_column.php

示例3: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for USERNAME field
     //
     $editor = new TextEdit('username_edit');
     $editor->SetSize(10);
     $editor->SetMaxLength(10);
     $editColumn = new CustomEditColumn('USERNAME', 'USERNAME', $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 ES_ADMIN field
     //
     $editor = new TextEdit('es_admin_edit');
     $editor->SetSize(1);
     $editor->SetMaxLength(1);
     $editColumn = new CustomEditColumn('ES ADMIN', 'ES_ADMIN', $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 NACIMIENTO field
     //
     $editor = new DateTimeEdit('nacimiento_edit', false, 'Y-m-d H:i:s', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('NACIMIENTO', 'NACIMIENTO', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for PRIMER_APELLIDO field
     //
     $editor = new TextEdit('primer_apellido_edit');
     $editor->SetSize(30);
     $editor->SetMaxLength(30);
     $editColumn = new CustomEditColumn('PRIMER APELLIDO', 'PRIMER_APELLIDO', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for SEGUNDO_APELLIDO field
     //
     $editor = new TextEdit('segundo_apellido_edit');
     $editor->SetSize(50);
     $editor->SetMaxLength(50);
     $editColumn = new CustomEditColumn('SEGUNDO APELLIDO', 'SEGUNDO_APELLIDO', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for NOMBRE field
     //
     $editor = new TextEdit('nombre_edit');
     $editor->SetSize(40);
     $editor->SetMaxLength(40);
     $editColumn = new CustomEditColumn('NOMBRE', 'NOMBRE', $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 GENERO_ID field
     //
     $editor = new ComboBox('genero_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new OracleConnectionFactory(), GetConnectionOptions(), '"GE"."GENERO"');
     $field = new IntegerField('GENERO_ID');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('NOMBRE');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new DateField('FEC_CREACION');
     $lookupDataset->AddField($field, false);
     $field = new StringField('USUARIO_CREACION');
     $lookupDataset->AddField($field, false);
     $field = new DateField('FEC_ULTIMA_MOD');
     $lookupDataset->AddField($field, false);
     $field = new StringField('USUARIO_ULTIMA_MOD');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('NOMBRE', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('GENERO ID', 'GENERO_ID', $editor, $this->dataset, 'GENERO_ID', 'NOMBRE', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for CIUDAD_ID field
     //
     $editor = new ComboBox('ciudad_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new OracleConnectionFactory(), GetConnectionOptions(), '"GE"."CIUDAD"');
     $field = new IntegerField('CIUDAD_ID');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('NOMBRE');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('PAIS_ID');
     $lookupDataset->AddField($field, false);
//.........这里部分代码省略.........
开发者ID:kcallow,项目名称:MatchMe,代码行数:101,代码来源:GE.PERSONA.php

示例4: GetNullValuePresentation

 private function GetNullValuePresentation($column)
 {
     if ($this->ShowHtmlNullValue()) {
         return StringUtils::Format('<em class="pgui-null-value">%s</em>', $this->GetCaptions()->GetMessageString('NullAsString'));
     } else {
         return '';
     }
 }
开发者ID:blakeHelm,项目名称:BallotPath,代码行数:8,代码来源:renderer.php

示例5: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for no_tipo_espacio field
     //
     $editor = new TextEdit('no_tipo_espacio_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('No Tipo Espacio', 'no_tipo_espacio', $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 id_tipo_espacio_padre field
     //
     $editor = new ComboBox('id_tipo_espacio_padre_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(
         new PgConnectionFactory(),
         GetConnectionOptions(),
         '"public"."sga_tipo_espacio"');
     $field = new IntegerField('id_tipo_espacio', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('no_tipo_espacio');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('id_tipo_espacio_padre');
     $lookupDataset->AddField($field, false);
     $field = new StringField('ds_referencia');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('no_tipo_espacio', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn(
         'Id Tipo Espacio Padre', 
         'id_tipo_espacio_padre', 
         $editor, 
         $this->dataset, 'id_tipo_espacio', 'no_tipo_espacio', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     
     //
     // Edit column for ds_referencia field
     //
     $editor = new TextAreaEdit('ds_referencia_edit', 50, 8);
     $editColumn = new CustomEditColumn('Ds Referencia', 'ds_referencia', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     if ($this->GetSecurityInfo()->HasAddGrant())
     {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     }
     else
     {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:jsrxar,项目名称:dto,代码行数:61,代码来源:tipo_espacio.php

示例6: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for programm_id field
     //
     $editor = new ComboBox('programm_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`program`');
     $field = new IntegerField('program_id', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('program_name');
     $lookupDataset->AddField($field, false);
     $field = new StringField('year');
     $lookupDataset->AddField($field, false);
     $field = new StringField('multi');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('description');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('lead');
     $lookupDataset->AddField($field, false);
     $field = new DateField('date_start');
     $lookupDataset->AddField($field, false);
     $field = new DateField('date_end');
     $lookupDataset->AddField($field, false);
     $field = new IntegerField('progress');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('notes');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('program_name', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Project Type', 'programm_id', $editor, $this->dataset, 'program_id', 'program_name', $lookupDataset);
     $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('2015'));
     $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'));
     $lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`Priority`');
     $field = new IntegerField('id', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('Name');
     $lookupDataset->AddField($field, false);
     $lookupDataset->SetOrderBy('Name', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('Priority', 'priority', $editor, $this->dataset, 'Name', 'Name', $lookupDataset);
//.........这里部分代码省略.........
开发者ID:CivicInfoBC,项目名称:workplan.gov_ver_1.19,代码行数:101,代码来源:project.php

示例7: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // 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);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for approved_budget field
     //
     $editor = new TextEdit('approved_budget_edit');
     $editColumn = new CustomEditColumn('Approved Budget', 'approved_budget', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $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 lead field
     //
     $editor = new TextEdit('lead_edit');
     $editColumn = new CustomEditColumn('Lead', 'lead', $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);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(false);
         $grid->SetShowInlineAddButton(false);
     } else {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:BCDevExchange,项目名称:WORKPLAN,代码行数:38,代码来源:Project_by_approved_budget.php

示例8: GetSQL

 public function GetSQL()
 {
     return StringUtils::Format('SELECT %s FROM (%s) %s', $this->GetFieldListAsSQL(), $this->selectCommand->GetSQL(), self::SubQueryAlias);
 }
开发者ID:outsourcinggithub,项目名称:outsourcing,代码行数:4,代码来源:select_command.php

示例9: GetValidationScripts

 public function GetValidationScripts()
 {
     return StringUtils::Format("function EditValidation(fieldValues, errorInfo) { %s; return true; } " . " function InsertValidation(fieldValues, errorInfo) { %s; return true; }" . " function EditForm_EditorValuesChanged(sender, editors) { %s; return true; }" . " function InsertForm_EditorValuesChanged(sender, editors) { %s; return true; }" . " function EditForm_Initialized(editors) { %s; return true; }" . " function InsertForm_Initialized(editors) { %s; return true; }", $this->GetGrid()->GetEditClientValidationScript(), $this->GetGrid()->GetInsertClientValidationScript(), $this->GetGrid()->GetEditClientEditorValueChangedScript(), $this->GetGrid()->GetInsertClientEditorValueChangedScript(), $this->GetGrid()->GetEditClientFormLoadedScript(), $this->GetGrid()->GetInsertClientFormLoadedScript());
 }
开发者ID:CivicInfoBC,项目名称:workplan.gov_ver_1.19,代码行数:4,代码来源:page.php

示例10: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for project_id field
     //
     $editor = new TextEdit('project_id_edit');
     $editColumn = new CustomEditColumn('Project Id', 'project_id', $editor, $this->dataset);
     $editColumn->SetAllowSetToDefault(true);
     $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_type field
     //
     $editor = new TextEdit('project_type_edit');
     $editor->SetSize(50);
     $editor->SetMaxLength(50);
     $editColumn = new CustomEditColumn('Project Type', 'project_type', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for project_name field
     //
     $editor = new TextAreaEdit('project_name_edit', 50, 8);
     $editColumn = new CustomEditColumn('Project Name', 'project_name', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for date_start field
     //
     $editor = new DateTimeEdit('date_start_edit', true, 'Y-m-d H:i:s', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Date Start', 'date_start', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for date_end field
     //
     $editor = new DateTimeEdit('date_end_edit', true, 'Y-m-d H:i:s', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Date End', 'date_end', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for year field
     //
     $editor = new TextEdit('year_edit');
     $editor->SetSize(4);
     $editor->SetMaxLength(4);
     $editColumn = new CustomEditColumn('Year', 'year', $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 Objective field
     //
     $editor = new TextEdit('objective_edit');
     $editColumn = new CustomEditColumn('Objective', 'Objective', $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 priority field
     //
     $editor = new TextEdit('priority_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Priority', 'priority', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for project_lead field
     //
     $editor = new TextEdit('project_lead_edit');
     $editor->SetSize(100);
     $editor->SetMaxLength(100);
     $editColumn = new CustomEditColumn('Project Lead', 'project_lead', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for approved_budget field
     //
     $editor = new TextEdit('approved_budget_edit');
     $editColumn = new CustomEditColumn('Approved Budget', 'approved_budget', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for budget_spent field
     //
     $editor = new TextEdit('budget_spent_edit');
     $editColumn = new CustomEditColumn('Budget Spent', 'budget_spent', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
//.........这里部分代码省略.........
开发者ID:BCDevExchange,项目名称:WORKPLAN,代码行数:101,代码来源:ProjectView.php

示例11: CreateGrid

 protected function CreateGrid()
 {
     $result = new Grid($this, $this->dataset, 'empresaGrid');
     if ($this->GetSecurityInfo()->HasDeleteGrant()) {
         $result->SetAllowDeleteSelected(false);
     } else {
         $result->SetAllowDeleteSelected(false);
     }
     ApplyCommonPageSettings($this, $result);
     $result->SetUseImagesForActions(true);
     $result->SetUseFixedHeader(false);
     $result->SetShowLineNumbers(false);
     $result->SetHighlightRowAtHover(false);
     $result->SetWidth('');
     $this->CreateGridSearchControl($result);
     $this->CreateGridAdvancedSearchControl($result);
     $this->AddFieldColumns($result);
     $this->AddSingleRecordViewColumns($result);
     $this->AddEditColumns($result);
     $this->AddInsertColumns($result);
     $this->AddPrintColumns($result);
     $this->AddExportColumns($result);
     $this->AddOperationsColumns($result);
     $this->SetShowPageList(true);
     $this->SetHidePageListByDefault(false);
     $this->SetExportToExcelAvailable(true);
     $this->SetExportToWordAvailable(true);
     $this->SetExportToXmlAvailable(true);
     $this->SetExportToCsvAvailable(true);
     $this->SetExportToPdfAvailable(true);
     $this->SetPrinterFriendlyAvailable(true);
     $this->SetSimpleSearchAvailable(true);
     $this->SetAdvancedSearchAvailable(true);
     $this->SetFilterRowAvailable(true);
     $this->SetVisualEffectsEnabled(true);
     $this->SetShowTopPageNavigator(true);
     $this->SetShowBottomPageNavigator(true);
     //
     // Http Handlers
     //
     //
     // View column for nombre field
     //
     $column = new TextViewColumn('nombre', 'Nombre', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for nombre field
     //
     $editor = new TextEdit('nombre_edit');
     $editor->SetSize(80);
     $editor->SetMaxLength(80);
     $editColumn = new CustomEditColumn('Nombre', 'nombre', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for nombre field
     //
     $editor = new TextEdit('nombre_edit');
     $editor->SetSize(80);
     $editor->SetMaxLength(80);
     $editColumn = new CustomEditColumn('Nombre', 'nombre', $editor, $this->dataset);
     $validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
     $editor->GetValidatorCollection()->AddValidator($validator);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'nombre_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
     //
     // View column for depto field
     //
     $column = new TextViewColumn('depto', 'Depto', $this->dataset);
     $column->SetOrderable(true);
     /* <inline edit column> */
     //
     // Edit column for depto field
     //
     $editor = new TextAreaEdit('depto_edit', 50, 8);
     $editColumn = new CustomEditColumn('Depto', 'depto', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetEditOperationColumn($editColumn);
     /* </inline edit column> */
     /* <inline insert column> */
     //
     // Edit column for depto field
     //
     $editor = new TextAreaEdit('depto_edit', 50, 8);
     $editColumn = new CustomEditColumn('Depto', 'depto', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $column->SetInsertOperationColumn($editColumn);
     /* </inline insert column> */
     $handler = new ShowTextBlobHandler($this->dataset, $this, 'depto_handler', $column);
     GetApplication()->RegisterHTTPHandler($handler);
//.........这里部分代码省略.........
开发者ID:Kenovix,项目名称:san-miguel,代码行数:101,代码来源:empresa.php

示例12: GetInputAttributes

 /**
  * @return string
  */
 public function GetInputAttributes($suppressRequiredValidation = false)
 {
     $result = '';
     $validationAttr = '';
     foreach ($this->list as $validator) {
         if ($suppressRequiredValidation && SMReflection::ClassName($validator) == 'RequiredValidator') {
             continue;
         }
         StringUtils::AddStr($validationAttr, $validator->GetValidatorName(), ' ');
         StringUtils::AddStr($result, $validator->GetAdditionalAttributes(), ' ');
     }
     if (!StringUtils::IsNullOrEmpty($validationAttr)) {
         StringUtils::AddStr($result, StringUtils::Format('data-validation="%s"', $validationAttr), ' ');
     }
     return $result;
 }
开发者ID:howareyoucolin,项目名称:demo,代码行数:19,代码来源:validators.php

示例13: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for MASCOTA_ID field
     //
     $editor = new TextEdit('mascota_id_edit');
     $editColumn = new CustomEditColumn('MASCOTA ID', 'MASCOTA_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 TIPO field
     //
     $editor = new TextEdit('tipo_edit');
     $editor->SetSize(20);
     $editor->SetMaxLength(20);
     $editColumn = new CustomEditColumn('TIPO', 'TIPO', $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);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     } else {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:kcallow,项目名称:MatchMe,代码行数:30,代码来源:GE.MASCOTA.php

示例14: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for off-numoff field
     //
     $editor = new TextEdit('off-numoff_edit');
     $editColumn = new CustomEditColumn('Off-numoff', 'off-numoff', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for off-codcli field
     //
     $editor = new ComboBox('off-codcli_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
     $lookupDataset = new TableDataset(new MyPDOConnectionFactory(), GetConnectionOptions(), '`clienti`');
     $field = new IntegerField('id', null, null, true);
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, true);
     $field = new StringField('cli-codcli');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('cli-ragsoc');
     $field->SetIsNotNull(true);
     $lookupDataset->AddField($field, false);
     $field = new StringField('cli-codlis');
     $lookupDataset->AddField($field, false);
     $field = new DateTimeField('datains');
     $lookupDataset->AddField($field, false);
     $field = new DateTimeField('datamod');
     $lookupDataset->AddField($field, false);
     $lookupDataset->setOrderByField('cli-ragsoc', GetOrderTypeAsSQL(otAscending));
     $editColumn = new LookUpEditColumn('cod.Cliente', 'off-codcli', $editor, $this->dataset, 'cli-codcli', 'cli-ragsoc', $lookupDataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for off-descriz field
     //
     $editor = new TextEdit('off-descriz_edit');
     $editor->SetSize(50);
     $editor->SetMaxLength(50);
     $editColumn = new CustomEditColumn('Off-descriz', 'off-descriz', $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 off-gg-termine-consegna field
     //
     $editor = new TextEdit('off-gg-termine-consegna_edit');
     $editColumn = new CustomEditColumn('Off-gg-termine-consegna', 'off-gg-termine-consegna', $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 off-datains field
     //
     $editor = new DateTimeEdit('off-datains_edit', true, 'd-m-Y', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Data inserimento', 'off-datains', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for off-dataeva field
     //
     $editor = new DateTimeEdit('off-dataeva_edit', true, 'd-m-Y', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Data evasione', 'off-dataeva', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     //
     // Edit column for datains field
     //
     $editor = new DateTimeEdit('datains_edit', false, 'd-m-Y', GetFirstDayOfWeek());
     $editColumn = new CustomEditColumn('Data ins', 'datains', $editor, $this->dataset);
     $editColumn->SetAllowSetToNull(true);
     $this->ApplyCommonColumnEditProperties($editColumn);
     $grid->AddInsertColumn($editColumn);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(true);
         $grid->SetShowInlineAddButton(false);
     } else {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:eroncalli,项目名称:atig,代码行数:87,代码来源:offerte.php

示例15: AddInsertColumns

 protected function AddInsertColumns(Grid $grid)
 {
     //
     // Edit column for ivo-codvoc field
     //
     $editor = new SpinEdit('ivo-codvoc_edit');
     $editColumn = new CustomEditColumn('Ivo-codvoc', 'ivo-codvoc', $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);
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $grid->SetShowAddButton(false);
         $grid->SetShowInlineAddButton(false);
     } else {
         $grid->SetShowInlineAddButton(false);
         $grid->SetShowAddButton(false);
     }
 }
开发者ID:eroncalli,项目名称:atig,代码行数:19,代码来源:query_listino_voci.php


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