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


PHP Frame_Decorator::split方法代码示例

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


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

示例1: split

 function split($child = null, $force_pagebreak = false)
 {
     if (is_null($child)) {
         parent::split();
         return;
     }
     if (count($this->_headers) && !in_array($child, $this->_headers, true) && !in_array($child->get_prev_sibling(), $this->_headers, true)) {
         $first_header = null;
         foreach ($this->_headers as $header) {
             $new_header = $header->deep_copy();
             if (is_null($first_header)) {
                 $first_header = $new_header;
             }
             $this->insert_child_before($new_header, $child);
         }
         parent::split($first_header);
     } else {
         if (in_array($child->get_style()->display, self::$ROW_GROUPS)) {
             parent::split($child);
         } else {
             $iter = $child;
             while ($iter) {
                 $this->_cellmap->remove_row($iter);
                 $iter = $iter->get_next_sibling();
             }
             parent::split($child);
         }
     }
 }
开发者ID:EfncoPlugins,项目名称:web-portal-lite-client-portal-secure-file-sharing-private-messaging,代码行数:29,代码来源:table_frame_decorator.cls.php

示例2: split

  /**
   * Override split() to remove all child rows and this element from the cellmap
   *
   * @param Frame $child
   * @param bool  $force_pagebreak
   *
   * @return void
   */
  function split(Frame $child = null, $force_pagebreak = false) {

    if ( is_null($child) ) {
      parent::split();
      return;
    }

    // Remove child & all subsequent rows from the cellmap
    $cellmap = $this->get_parent()->get_cellmap();
    $iter = $child;

    while ( $iter ) {
      $cellmap->remove_row($iter);
      $iter = $iter->get_next_sibling();
    }

    // If we are splitting at the first child remove the
    // table-row-group from the cellmap as well
    if ( $child === $this->get_first_child() ) {
      $cellmap->remove_row_group($this);
      parent::split();
      return;
    }

    $cellmap->update_row_group($this, $child->get_prev_sibling());
    parent::split($child);

  }
开发者ID:hendrosteven,项目名称:f3-template,代码行数:36,代码来源:table_row_group_frame_decorator.cls.php

示例3: split

 /**
  * Split the table at $row.  $row and all subsequent rows will be
  * added to the clone.  This method is overidden in order to remove
  * frames from the cellmap properly.
  *
  * @param Frame $row
  */
 function split($child = null)
 {
     parent::split($child);
     // Update the cellmap
     $iter = $child;
     while ($iter) {
         $this->_cellmap->remove_row($iter);
         $iter = $iter->get_next_sibling();
     }
 }
开发者ID:andrewroth,项目名称:c4c_intranet,代码行数:17,代码来源:table_frame_decorator.cls.php

示例4: split

 function split($child = null, $force_pagebreak = false)
 {
     if (is_null($child)) {
         parent::split();
         return;
     }
     $cellmap = $this->get_parent()->get_cellmap();
     $iter = $child;
     while ($iter) {
         $cellmap->remove_row($iter);
         $iter = $iter->get_next_sibling();
     }
     if ($child === $this->get_first_child()) {
         $cellmap->remove_row_group($this);
         parent::split();
         return;
     }
     $cellmap->update_row_group($this, $child->get_prev_sibling());
     parent::split($child);
 }
开发者ID:EfncoPlugins,项目名称:web-portal-lite-client-portal-secure-file-sharing-private-messaging,代码行数:20,代码来源:table_row_group_frame_decorator.cls.php

示例5: split

 /**
  * split the table at $row.  $row and all subsequent rows will be
  * added to the clone.  This method is overidden in order to remove
  * frames from the cellmap properly.
  *
  * @param Frame $child
  * @param bool  $force_pagebreak
  *
  * @return void
  */
 function split(Frame $child = null, $force_pagebreak = false)
 {
     if (is_null($child)) {
         parent::split();
         return;
     }
     // If $child is a header or if it is the first non-header row, do
     // not duplicate headers, simply move the table to the next page.
     if (count($this->_headers) && !in_array($child, $this->_headers, true) && !in_array($child->get_prev_sibling(), $this->_headers, true)) {
         $first_header = null;
         // Insert copies of the table headers before $child
         foreach ($this->_headers as $header) {
             $new_header = $header->deep_copy();
             if (is_null($first_header)) {
                 $first_header = $new_header;
             }
             $this->insert_child_before($new_header, $child);
         }
         parent::split($first_header);
     } else {
         if (in_array($child->get_style()->display, self::$ROW_GROUPS)) {
             // Individual rows should have already been handled
             parent::split($child);
         } else {
             $iter = $child;
             while ($iter) {
                 $this->_cellmap->remove_row($iter);
                 $iter = $iter->get_next_sibling();
             }
             parent::split($child);
         }
     }
 }
开发者ID:TheTypoMaster,项目名称:SPHERE-Framework,代码行数:43,代码来源:table_frame_decorator.cls.php

示例6: split

 /**
  * Override split() to remove all child rows and this element from the cellmap
  *
  * @param Frame $child
  */
 function split($child = null, $force_pagebreak = false)
 {
     if (is_null($child)) {
         parent::split();
         return;
     }
     // Remove child & all subsequent rows from the cellmap
     $cellmap = $this->get_parent()->get_cellmap();
     // ------------- my fix: (ydb1976@gmail.com)
     while ($child->get_node()->getAttribute("dontbreak")) {
         //
         $child = $child->get_prev_sibling();
     }
     // ------------- end of my fix
     $iter = $child;
     while ($iter) {
         $cellmap->remove_row($iter);
         $iter = $iter->get_next_sibling();
     }
     // If we are splitting at the first child remove the
     // table-row-group from the cellmap as well
     if ($child === $this->get_first_child()) {
         $cellmap->remove_row_group($this);
         parent::split();
         return;
     }
     $cellmap->update_row_group($this, $child->get_prev_sibling());
     parent::split($child);
 }
开发者ID:kulgee001,项目名称:yggdrasil,代码行数:34,代码来源:table_row_group_frame_decorator.cls.php


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