本文整理汇总了PHP中StringUtils::AddStr方法的典型用法代码示例。如果您正苦于以下问题:PHP StringUtils::AddStr方法的具体用法?PHP StringUtils::AddStr怎么用?PHP StringUtils::AddStr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringUtils
的用法示例。
在下文中一共展示了StringUtils::AddStr方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Render
public function Render()
{
include_once 'libs/smartylibs/Smarty.class.php';
$smarty = new Smarty();
$smarty->template_dir = 'components/templates';
$smarty->assign_by_ref('Page', $this);
$users = $this->tableBasedGrantsManager->GetAllUsersAsJson();
$smarty->assign_by_ref('Users', $users);
$localizerCaptions = $this->GetLocalizerCaptions();
$smarty->assign_by_ref('Captions', $localizerCaptions);
/* $roles = $this->tableBasedGrantsManager->GetAllRolesAsJson();
$smarty->assign_by_ref('Roles', $roles); */
$headerString = 'Content-Type: text/html';
if ($this->GetContentEncoding() != null) {
StringUtils::AddStr($headerString, 'charset=' . $this->GetContentEncoding(), ';');
}
header($headerString);
$pageInfos = GetPageInfos();
$pageListViewData = array('Pages' => array(), 'CurrentPageOptions' => array());
foreach ($pageInfos as $pageInfo) {
$pageListViewData['Pages'][] = array('Caption' => $this->RenderText($pageInfo['caption']), 'Hint' => $this->RenderText($pageInfo['short_caption']), 'Href' => $pageInfo['filename'], 'GroupName' => $this->RenderText($pageInfo['group_name']), 'BeginNewGroup' => $pageInfo['add_separator']);
}
$pageGroups = GetPageGroups();
foreach ($pageGroups as &$pageGroup) {
$pageGroup = $this->RenderText($pageGroup);
}
$pageListViewData['Groups'] = $pageGroups;
$smarty->assign_by_ref('PageList', $pageListViewData);
$authenticationViewData = $this->GetAuthenticationViewData();
$smarty->assign_by_ref('Authentication', $authenticationViewData);
$smarty->display('admin_panel.tpl');
}
示例2: GetLink
public function GetLink()
{
$parameterList = '';
foreach ($this->parameters as $name => $value) {
StringUtils::AddStr($parameterList, urlencode($name) . '=' . urlencode($value), '&');
}
return $this->targetPage . ($parameterList != '' ? '?' : '') . $parameterList;
}
示例3: GetStyleString
public function GetStyleString()
{
$result = '';
foreach ($this->styles as $paramName => $paramValue) {
StringUtils::AddStr($result, "{$paramName}: {$paramValue};", ' ');
}
foreach ($this->styleStrings as $styleString) {
if (!StringUtils::IsNullOrEmpty($styleString) && !StringUtils::EndsBy($styleString, ';')) {
$styleString .= ';';
}
StringUtils::AddStr($result, $styleString, ' ');
}
return $result;
}
示例4: GetGridClasses
private function GetGridClasses()
{
$result = '';
StringUtils::AddStr($result, 'stripped', ' ');
if ($this->GetHighlightRowAtHover()) {
StringUtils::AddStr($result, 'row-hover-highlight', ' ');
}
if ($this->GetUseFixedHeader()) {
StringUtils::AddStr($result, 'fixed-header', ' ');
}
return $result;
}
示例5: GetFieldListAsSQL
private function GetFieldListAsSQL()
{
$result = '';
foreach ($this->fieldAggregations as $fieldName => $aggregationInfo) {
if (!$aggregationInfo->HasAlias()) {
StringUtils::AddStr($result, $aggregationInfo->GetAggregate()->AsSQL($this->engCommandImp->QuoteIdentifier($fieldName)), ', ');
} else {
StringUtils::AddStr($result, $this->engCommandImp->GetAliasedAsFieldExpression($aggregationInfo->GetAggregate()->AsSQL($this->engCommandImp->QuoteIdentifier($fieldName)), $this->engCommandImp->QuoteIdentifier($aggregationInfo->GetAlias())), ', ');
}
}
return $result;
}
示例6: AddStr
private function AddStr($string, $delimiter = '')
{
StringUtils::AddStr($this->result, $string, $delimiter);
}
示例7: 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;
}
示例8: GetGridColumnClass
public function GetGridColumnClass()
{
$result = parent::GetGridColumnClass() ? parent::GetGridColumnClass() : parent::GetGridColumnClass();
if ($this->GetGrid()->GetShowKeyColumnsImagesInHeader()) {
if ($this->dataset->IsFieldPrimaryKey($this->fieldName)) {
StringUtils::AddStr($result, 'primary-key', ' ');
}
if ($this->dataset->IsLookupField($this->fieldName)) {
if ($this->dataset->IsLookupFieldNameByDisplayFieldName($this->fieldName)) {
if ($this->dataset->IsFieldPrimaryKey($this->dataset->IsLookupFieldNameByDisplayFieldName($this->fieldName))) {
StringUtils::AddStr($result, 'primary-key', ' ');
}
}
StringUtils::AddStr($result, 'foreign-key', ' ');
}
}
if ($this->ShowOrderingControl()) {
StringUtils::AddStr($result, 'sortable', ' ');
}
StringUtils::AddStr($result, $this->GetSortOrderColumnClass(), ' ');
return $result;
}