本文整理汇总了PHP中FormHelper::getRelationRow方法的典型用法代码示例。如果您正苦于以下问题:PHP FormHelper::getRelationRow方法的具体用法?PHP FormHelper::getRelationRow怎么用?PHP FormHelper::getRelationRow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormHelper
的用法示例。
在下文中一共展示了FormHelper::getRelationRow方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array_merge
">
<!-- List of existing relations -->
<?php
if (is_object($this->item)) {
$fathers = $this->item->getFathers();
$mothers = $this->item->getMothers();
$parents = array_merge($fathers, $mothers);
if (count($parents)) {
$k = 4;
for ($i = 0, $n = count($parents); $i < $n; $i++) {
$parent =& $parents[$i];
$parent->orderNumber = $i + 1;
?>
<!-- Row for one existing relation -->
<?php
echo FormHelper::getRelationRow($parent, 'parents', $this->form);
?>
<!-- End: Row for one existing relation -->
<?php
$k = 7 - $k;
}
}
}
?>
<!-- End: List of existing relations -->
</tbody>
<!-- End: tabel body for relations -->
</table>
<!-- End: Relations -->
示例2:
$tabRelId = 're' . $j . '_';
?>
<tbody id="<?php
echo $tabRelId;
?>
">
<?php
// loop through the children and filter on the correct parent
$k = 4;
for ($i = 0, $n = count($children); $i < $n; $i++) {
if ($children[$i]->secondParent_id == $partners[$j]->id) {
$child =& $children[$i];
$child->orderNumber = $orderNumber++;
// Row for one existing relation
echo FormHelper::getRelationRow($child, 'children', $this->form);
//End: Row for one existing relation
$k = 7 - $k;
}
}
?>
</tbody><!-- End: List of children -->
</table><!-- End: tabel body for relations -->
<?php
}
// end counter > 0 (children for specific partner)
}
// end looping through partners
}
// end else-branch
}
示例3:
echo $tabRelId;
?>
">
<!-- List of existing relations -->
<?php
if (is_object($this->item)) {
$partners = $this->item->getPartners();
if (count($partners)) {
$k = 4;
for ($i = 0, $n = count($partners); $i < $n; $i++) {
$partner =& $partners[$i];
$partner->orderNumber = $i + 1;
?>
<!-- Row for one existing relation -->
<?php
echo FormHelper::getRelationRow($partner, 'partners', $this->form);
?>
<!-- End: Row for one existing relation -->
<?php
$k = 7 - $k;
}
}
}
?>
<!-- End: List of existing relations -->
</tbody>
<!-- End: tabel body for relations -->
</table>
<!-- End: Relations -->