コード例 #1
0
ファイル: box.block.php プロジェクト: isantiago/foswiki
 /** 
  * Create new block element and automatically initialize its contents 
  * with the given text string
  *
  * @param string $content The text string to be put inside the block box
  *
  * @return BlockBox new BlockBox object (with contents filled)
  *
  * @see InlineBox
  * @see InlineBox::create_from_text()
  */
 function &create_from_text($content, &$pipeline)
 {
     $box = new BlockBox();
     $box->readCSS($pipeline->get_current_css_state());
     $box->add_child(InlineBox::create_from_text($content, $box->get_css_property(CSS_WHITE_SPACE), $pipeline));
     return $box;
 }
コード例 #2
0
 /** 
  * Create new block element and automatically initialize its contents 
  * with the given text string
  *
  * @param string $content The text string to be put inside the block box
  *
  * @return BlockBox new BlockBox object (with contents filled)
  *
  * @see InlineBox
  * @see InlineBox::create_from_text()
  */
 function &create_from_text($content)
 {
     $box = new BlockBox();
     $box->add_child(InlineBox::create_from_text($content, $box->white_space));
     return $box;
 }