本文整理汇总了PHP中PBHelper::isArray方法的典型用法代码示例。如果您正苦于以下问题:PHP PBHelper::isArray方法的具体用法?PHP PBHelper::isArray怎么用?PHP PBHelper::isArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PBHelper
的用法示例。
在下文中一共展示了PBHelper::isArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isArray
static function isArray($array, $key, $index = 0)
{
if ($index >= count($key)) {
return true;
}
if (array_key_exists($key[$index], $array)) {
return PBHelper::isArray($array[$key[$index]], $key, ++$index);
}
return false;
}
示例2: create
//.........这里部分代码省略.........
}
} else {
foreach ($multiData as $groupId => $groupData) {
if (!isset($panelHTML[$panelId])) {
$panelHTML[$panelId] = null;
}
if ($groupId != 0) {
$elementHTML = null;
foreach ($groupData as $elementData) {
if (!$this->displayField($elementData['visibility'])) {
continue;
}
$id = $elementData['id'];
PBHelper::removeUIndex($this->componentValue, $id);
$elementHTML .= '
<div>
' . $this->createFieldLegend($elementData['ui']['text']['label']) . '
' . $this->createField($elementData, $this->componentValue[$id]) . '
</div>
';
}
PBHelper::removeUIndex($this->componentData['structure']['ui']['group'][$groupId], 'header', 'subheader');
if ($Validation->isNotEmpty($elementHTML)) {
$panelHTML[$panelId] .= '
<li>
' . $this->createGroupHeader($this->componentData['structure']['ui']['group'][$groupId]['header']) . '
' . $this->createGroupSubheader($this->componentData['structure']['ui']['group'][$groupId]['header'], $this->componentData['structure']['ui']['group'][$groupId]['subheader']) . '
' . $elementHTML . '
</li>
';
}
} else {
foreach ($groupData as $elementData) {
if (!$this->displayField($elementData['visibility'])) {
continue;
}
$id = $elementData['id'];
PBHelper::removeUIndex($this->componentValue, $id);
$panelHTML[$panelId] .= '
<li>
' . $this->createGroupHeader($elementData['ui']['text']['header']) . '
' . $this->createGroupSubheader($elementData['ui']['text']['header'], $elementData['ui']['text']['subheader']) . '
<div>
' . $this->createFieldLegend($elementData['ui']['text']['label']) . '
' . $this->createField($elementData, $this->componentValue[$id]) . '
</div>
</li>
';
}
}
}
}
}
}
if (PBHelper::isArray($this->componentData['structure'], array('ui', 'panel'))) {
$tabBar = null;
$tabContent = null;
foreach ($panelHTML as $index => $value) {
$tabBar .= '
<li>
<a href="#tab-' . $index . '">' . $this->componentData['structure']['ui']['panel'][$index]['header'] . '</a>
</li>
';
$tabContent .= '
<div id="tab-' . $index . '">
<div>
<ul class="pb-reset-list pb-field-list">
' . $value . '
</ul>
</div>
</div>
';
}
$html = '
<div class="pb-tab">
<ul>
' . $tabBar . '
</ul>
' . $tabContent . '
</div>
';
} else {
$html = '
<ul class="pb-reset-list pb-field-list">
' . $panelHTML[0] . '
</ul>
';
}
$html = '
<div class="pb">
<form name="pb-component-edit-form" id="pb-component-edit-form" action="">
' . $html . '
</form>
</div>
';
return $html;
}