コード例 #1
0
ファイル: MediaObject.php プロジェクト: Vrian7ipx/repocas
 /**
  * Build a new Media Object
  *
  * @param string $image   Image URL
  * @param string $title   Title
  * @param string $content Content
  */
 public function __construct($image, $title, $content)
 {
     $this->addClass('media');
     $image = Image::create($image);
     $figure = Element::figure($image)->class('media-object');
     $body = Element::div()->class('media-body');
     $title = Element::h2($title)->class('media-heading');
     $this->nest(array('figure' => $figure, 'body' => $body->nest(array('title' => $title, 'content' => $content))));
 }