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


PHP ArrayUtil::getNestedValue方法代码示例

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


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

示例1: __get

 public function __get($name)
 {
     if (strpos($name, '[')) {
         $basePropertyName = substr($name, 0, strpos($name, '['));
         $index = substr($name, strpos($name, '[') + 1);
         if (property_exists($this, $basePropertyName)) {
             return ArrayUtil::getNestedValue($this->{$basePropertyName}, $index);
         }
     }
     return parent::__get($name);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:11,代码来源:BuilderElementEditableModelForm.php

示例2: renderControlContentNonEditable

 protected function renderControlContentNonEditable()
 {
     $src = $this->resolveDividerImageUrl();
     $alt = static::resolveLabel();
     $imageOptions = array();
     $imageHeight = ArrayUtil::getNestedValue($this->properties, "frontend['inlineStyles']['border-top-width']");
     if (isset($imageHeight)) {
         // get rid of px as for border-top-width we have to save it with px(it appears in style property).
         $imageHeight = substr($imageHeight, 0, -2);
         $imageOptions = array('height' => $imageHeight);
     }
     $content = ZurmoHtml::image($src, $alt, $imageOptions);
     return $content;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:14,代码来源:BuilderDividerElement.php

示例3: resolveColumnCssClassesByRowConfiguration

 protected function resolveColumnCssClassesByRowConfiguration()
 {
     $configuration = ArrayUtil::getNestedValue($this->properties, "backend['configuration']");
     if (!isset($configuration)) {
         return array();
     }
     $columnCssClasses = null;
     $columnKeysAndCssClasses = null;
     $columnKeys = array_keys($this->content);
     if (strpos($configuration, ':') == false) {
         $columnCount = intval($configuration);
         $columnWidth = NumberToWordsUtil::convert(static::MAX_COLUMN_WIDTH / $columnCount);
         $columnCssClasses = array(BuilderColumnElement::TABLE_CSS_CLASSES_PARAM_KEY => $columnWidth);
         $columnCssClasses = array_fill(0, count($columnKeys), $columnCssClasses);
     } else {
         $ratios = explode(':', $configuration);
         $total = array_sum($ratios);
         $unitRatioWidth = static::MAX_COLUMN_WIDTH / $total;
         foreach ($ratios as $ratio) {
             $width = NumberToWordsUtil::convert($ratio * $unitRatioWidth);
             $columnCssClasses[] = array(BuilderColumnElement::TABLE_CSS_CLASSES_PARAM_KEY => $width);
         }
     }
     $columnKeysAndCssClasses = array_combine($columnKeys, $columnCssClasses);
     return $columnKeysAndCssClasses;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:26,代码来源:BuilderRowElement.php

示例4: resolveNonEditableWrapperHtmlOptions

 protected function resolveNonEditableWrapperHtmlOptions()
 {
     $htmlOptions = parent::resolveNonEditableWrapperHtmlOptions();
     $htmlOptions['class'] .= ' ' . $this->properties['backend']['sizeClass'];
     $htmlOptions['align'] = ArrayUtil::getArrayValue($this->properties['backend'], 'align');
     $width = ArrayUtil::getNestedValue($this->properties, "backend['width']");
     if ($width) {
         $htmlOptions['width'] = $width;
     }
     return $htmlOptions;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:11,代码来源:BuilderButtonElement.php

示例5: resolveInlineStylesForBorderDirectionNegationFromBackendPropertiesNonEditable

 protected function resolveInlineStylesForBorderDirectionNegationFromBackendPropertiesNonEditable(array &$mergedProperties)
 {
     $borderNegationStyles = ArrayUtil::getNestedValue($this->properties, 'backend[border-negation]');
     if (!empty($borderNegationStyles)) {
         $borderNegationKeys = array_keys($borderNegationStyles, 'none');
         foreach ($borderNegationKeys as $borderNegationKey) {
             $mergedProperties['style'] .= "{$borderNegationKey}:none;";
         }
     }
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:10,代码来源:BaseBuilderElement.php


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