phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
HtmlImage.php
Go to the documentation of this file.
1<?php
2
4
8
17
18 public function __construct($identifier, $src="", $alt="", $size=NULL) {
19 $image=new HtmlImg("img-", $src, $alt);
20 $image->setClass("");
21 parent::__construct($identifier, "div", "ui image", $image);
22 if (isset($size))
23 $this->setSize($size);
24 }
25
26 public function setCircular() {
27 return $this->addToProperty("class", "circular");
28 }
29
30 public function asAvatar($caption=NULL) {
31 if (isset($caption))
32 $this->wrap("", $caption);
33 return $this->addToProperty("class", "avatar");
34 }
35
36 public static function small($identifier, $src="", $alt="") {
37 return new HtmlImage($identifier, $src, $alt, Size::SMALL);
38 }
39
40 public static function avatar($identifier, $src="", $caption=NULL) {
41 $img=new HtmlImage($identifier, $src);
42 return $img->asAvatar($caption);
43 }
44}
wrap($before, $after="")
Definition BaseHtml.php:170
Base class for Semantic double elements.
addToProperty($name, $value, $separator=" ")
Semantic Image component.
Definition HtmlImage.php:16
static small($identifier, $src="", $alt="")
Definition HtmlImage.php:36
__construct($identifier, $src="", $alt="", $size=NULL)
Definition HtmlImage.php:18
static avatar($identifier, $src="", $caption=NULL)
Definition HtmlImage.php:40