3 final class PhameBlogListView
extends AphrontTagView
{
7 public function setBlogs($blogs) {
8 assert_instances_of($blogs, 'PhameBlog');
13 protected function getTagAttributes() {
15 $classes[] = 'phame-blog-list';
16 return array('class' => implode(' ', $classes));
19 protected function getTagContent() {
20 require_celerity_resource('phame-css');
23 foreach ($this->blogs
as $blog) {
24 $image_uri = $blog->getProfileImageURI();
28 'class' => 'phame-blog-list-image',
29 'style' => 'background-image: url('.$image_uri.');',
30 'href' => $blog->getViewURI(),
36 'class' => 'phame-blog-list-title',
37 'href' => $blog->getViewURI(),
41 $icon = id(new PHUIIconView())
42 ->setIcon('fa-plus-square')
43 ->addClass('phame-blog-list-icon');
45 $add_new = phutil_tag(
48 'href' => '/phame/post/edit/?blog='.$blog->getID(),
49 'class' => 'phame-blog-list-new-post',
56 'class' => 'phame-blog-list-item',
69 'href' => '/phame/blog/edit/',
71 pht('Create a Blog'));
77 'class' => 'phame-blog-list-header',
82 'href' => '/phame/blog/',
86 return id(new PHUIBoxView())
87 ->appendChild($header)
90 ->setColor(PHUIBoxView
::BLUE
);