當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。