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


PHP FormHelper::getRelationRow方法代码示例

本文整理汇总了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 -->
开发者ID:Lothurm,项目名称:J3.x,代码行数:31,代码来源:form_parents.php

示例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
        }
开发者ID:Lothurm,项目名称:J3.x,代码行数:31,代码来源:form_children.php

示例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 -->
开发者ID:Lothurm,项目名称:J3.x,代码行数:31,代码来源:form_partners.php


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