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


PHP Element::resolveInputNamePrefixIntoString方法代码示例

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


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

示例1: renderAttributeIndexOrDerivedType

 /**
  * @return string
  */
 protected function renderAttributeIndexOrDerivedType()
 {
     $hiddenInputName = Element::resolveInputNamePrefixIntoString(array_merge($this->inputPrefixData, array('attributeIndexOrDerivedType')));
     $hiddenInputId = Element::resolveInputIdPrefixIntoString(array_merge($this->inputPrefixData, array('attributeIndexOrDerivedType')));
     $idInputHtmlOptions = array('id' => $hiddenInputId);
     return ZurmoHtml::hiddenField($hiddenInputName, $this->model->getAttributeIndexOrDerivedType(), $idInputHtmlOptions);
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:10,代码来源:RuntimeReportAttributeToElementAdapter.php

示例2: resolveItemsAndContent

 /**
  * @return array
  */
 protected function resolveItemsAndContent()
 {
     $items = array();
     $inputName = Element::resolveInputNamePrefixIntoString(array('SavedWorkflow', 'savedWorkflowIds'));
     foreach ($this->savedWorkflows as $workflow) {
         $content = '<div class="dynamic-row">';
         $content .= ZurmoHtml::hiddenField($inputName . '[]', $workflow->id);
         $content .= strval($workflow);
         $content .= '</div>';
         $items[] = array('content' => $content);
     }
     return $items;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:16,代码来源:WorkflowManageOrderListView.php

示例3: renderDynamicSearchAttributeInput

 public static function renderDynamicSearchAttributeInput($viewClassName, $modelClassName, $formModelClassName, $rowNumber, $attributeIndexOrDerivedType, $searchAttributes = array(), $suffix = null)
 {
     assert('is_string($viewClassName)');
     assert('is_string($modelClassName)');
     assert('is_string($formModelClassName)');
     assert('is_int($rowNumber)');
     assert('is_string($attributeIndexOrDerivedType) || $attributeIndexOrDerivedType == null');
     assert('is_array($searchAttributes)');
     assert('is_string($suffix) || $suffix == null');
     $content = null;
     if (count(explode(FormModelUtil::RELATION_DELIMITER, $attributeIndexOrDerivedType)) > 1) {
         $model = new $modelClassName(false);
         $nestedAttributes = explode(FormModelUtil::RELATION_DELIMITER, $attributeIndexOrDerivedType);
         $inputPrefix = array($formModelClassName, DynamicSearchForm::DYNAMIC_NAME, $rowNumber);
         $totalNestedCount = count($nestedAttributes);
         $processCount = 1;
         $nestedSearchAttributes = $searchAttributes;
         foreach ($nestedAttributes as $attribute) {
             if ($processCount < $totalNestedCount && isset($nestedSearchAttributes[$attribute])) {
                 $nestedSearchAttributes = $nestedSearchAttributes[$attribute];
                 if (isset($nestedSearchAttributes['relatedData'])) {
                     unset($nestedSearchAttributes['relatedData']);
                 }
             }
             if ($processCount < $totalNestedCount) {
                 $model = SearchUtil::resolveModelToUseByModelAndAttributeName($model, $attribute);
                 $inputPrefix[] = $attribute;
                 $relatedDataName = Element::resolveInputNamePrefixIntoString($inputPrefix) . '[relatedData]';
                 $content .= ZurmoHtml::hiddenField($relatedDataName, true);
             }
             $processCount++;
         }
         $attributeIndexOrDerivedType = $attribute;
         $modelToUse = $model;
         $modelToUse->setAttributes($nestedSearchAttributes);
         $cellElementModelClassName = get_class($model->getModel());
         //Dynamic Search needs to always assume there is an available SearchForm
         //Always assumes the SearchView to use matches the exact pluralCamelCasedName.
         //Does not support nested relations to leads persay.  It will resolve as a Contact.
         //This is not a problem since you can't relate a model to a lead, it is related to a contact.
         //So this scenario would not come up naturally.
         $moduleClassName = $model->getModel()->getModuleClassName();
         $viewClassName = $moduleClassName::getPluralCamelCasedName() . 'SearchView';
         $element = DynamicSearchUtil::getCellElement($viewClassName, $cellElementModelClassName, $attributeIndexOrDerivedType);
     } else {
         $model = new $modelClassName(false);
         $model->setScenario('importModel');
         //this is so attributes such as modified user can be set
         $modelToUse = new $formModelClassName($model);
         $modelToUse->setAttributes($searchAttributes);
         $inputPrefix = array($formModelClassName, DynamicSearchForm::DYNAMIC_NAME, $rowNumber);
         $element = DynamicSearchUtil::getCellElement($viewClassName, $modelClassName, $attributeIndexOrDerivedType);
     }
     $form = new NoRequiredsActiveForm();
     $form->id = "search-form";
     $element['inputPrefix'] = $inputPrefix;
     $elementclassname = $element['type'] . 'Element';
     $element = new $elementclassname($modelToUse, $element['attributeName'], $form, array_slice($element, 2));
     $element->editableTemplate = '{content}{error}';
     $content .= $element->render();
     DropDownUtil::registerScripts(CClientScript::POS_END);
     return $content;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:63,代码来源:DynamicSearchUtil.php

示例4: renderHiddenStructurePositionInput

 /**
  * @return string
  */
 protected function renderHiddenStructurePositionInput()
 {
     $hiddenInputName = Element::resolveInputNamePrefixIntoString(array_merge($this->inputPrefixData, array('structurePosition')));
     $hiddenInputId = Element::resolveInputIdPrefixIntoString(array_merge($this->inputPrefixData, array('structurePosition')));
     $idInputHtmlOptions = array('id' => $hiddenInputId, 'class' => 'structure-position');
     return ZurmoHtml::hiddenField($hiddenInputName, $this->rowNumber + 1, $idInputHtmlOptions);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:10,代码来源:AttributeRowForWizardModelComponentView.php

示例5: renderHiddenOperator

 /**
  * Builds hidden operator input. Used in the event there is only one operator available. No reason to show
  * that in the user interface
  * @return string
  */
 protected function renderHiddenOperator()
 {
     if ($this->model->hasAvailableOperatorsType() && count($this->model->getOperatorValuesAndLabels()) == 1) {
         $hiddenInputName = Element::resolveInputNamePrefixIntoString(array_merge($this->inputPrefixData, array('operator')));
         $hiddenInputId = Element::resolveInputIdPrefixIntoString(array_merge($this->inputPrefixData, array('operator')));
         $idInputHtmlOptions = array('id' => $hiddenInputId);
         $valuesAndLabels = $this->model->getOperatorValuesAndLabels();
         return ZurmoHtml::hiddenField($hiddenInputName, key($valuesAndLabels), $idInputHtmlOptions);
     }
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:15,代码来源:ReportAttributeToElementAdapter.php

示例6: renderHiddenRecipientsInputForValidationContent

 /**
  * @return string
  */
 protected function renderHiddenRecipientsInputForValidationContent()
 {
     $hiddenInputId = Element::resolveInputIdPrefixIntoString(array_merge($this->inputPrefixData, array('recipientsValidation')));
     $hiddenInputName = Element::resolveInputNamePrefixIntoString(array_merge($this->inputPrefixData, array('recipientsValidation')));
     $idInputHtmlOptions = array('id' => $hiddenInputId);
     $id = Element::resolveInputIdPrefixIntoString(array_merge($this->inputPrefixData, array('recipientsValidation')));
     $content = ZurmoHtml::hiddenField($hiddenInputName, null, $idInputHtmlOptions);
     $content .= $this->form->error($this->model, 'recipientsValidation', array('inputID' => $hiddenInputId), true, true, $id);
     return $content;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:13,代码来源:EmailMessageRowForWorkflowComponentView.php

示例7: renderRelatedModelRelationHiddenInputContent

 /**
  * @return string
  */
 protected function renderRelatedModelRelationHiddenInputContent()
 {
     $hiddenInputName = Element::resolveInputNamePrefixIntoString(array_merge($this->inputPrefixData, array('relatedModelRelation')));
     $hiddenInputId = Element::resolveInputIdPrefixIntoString(array_merge($this->inputPrefixData, array('relatedModelRelation')));
     $idInputHtmlOptions = array('id' => $hiddenInputId);
     return ZurmoHtml::hiddenField($hiddenInputName, $this->model->relatedModelRelation, $idInputHtmlOptions);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:10,代码来源:ActionRowForWorkflowComponentView.php

示例8: renderTypeContent

 /**
  * @return A|string
  */
 protected function renderTypeContent()
 {
     $typeValuesAndLabels = $this->model->getTypeValuesAndLabels($this->isCreatingNewModel(), $this->isAttributeRequired);
     if (count($typeValuesAndLabels) > 1) {
         $params = array('inputPrefix' => $this->inputPrefixData, 'typeValuesAndLabels' => $typeValuesAndLabels);
         $typeElement = new WorkflowActionAttributeTypeStaticDropDownElement($this->model, 'type', $this->form, $params);
         $typeElement->editableTemplate = '{content}{error}';
         return $typeElement->render();
     } else {
         $label = reset($typeValuesAndLabels);
         $name = Element::resolveInputNamePrefixIntoString($this->inputPrefixData) . '[type]';
         $id = Element::resolveInputIdPrefixIntoString($this->inputPrefixData) . 'type';
         $htmlOptions = array('id' => $id);
         $content = ZurmoHtml::tag('span', array(), $label);
         $content .= ZurmoHtml::hiddenField($name, key($typeValuesAndLabels), $htmlOptions);
         return $content;
     }
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:21,代码来源:WorkflowActionAttributeToElementAdapter.php

示例9: renderTypeContent

 protected function renderTypeContent()
 {
     $name = Element::resolveInputNamePrefixIntoString($this->inputPrefixData) . '[type]';
     $id = Element::resolveInputIdPrefixIntoString($this->inputPrefixData) . 'type';
     $htmlOptions = array('id' => $id);
     return ZurmoHtml::hiddenField($name, $this->emailMessageRecipientType, $htmlOptions);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:7,代码来源:WorkflowEmailMessageRecipientToElementAdapter.php


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