예제 #1
0
파일: Block.php 프로젝트: rganin/magelight
 /**
  * Append section
  *
  * @param string $name - section name
  * @param \Magelight\Block|string $block
  * @return Block
  */
 public function sectionAppend($name, $block)
 {
     if ($block instanceof \Magelight\Block) {
         $block->init();
     }
     if (!isset(self::$sections[$name]) || !is_array(self::$sections[$name])) {
         return $this->sectionReplace($name, $block);
     }
     self::$sections[$name][] = $block;
     return $this;
 }