Path: blob/master/src/infrastructure/markup/view/PHUIRemarkupImageView.php
12241 views
<?php12final class PHUIRemarkupImageView3extends AphrontView {45private $uri;6private $width;7private $height;8private $alt;9private $classes = array();1011public function setURI($uri) {12$this->uri = $uri;13return $this;14}1516public function getURI() {17return $this->uri;18}1920public function setWidth($width) {21$this->width = $width;22return $this;23}2425public function getWidth() {26return $this->width;27}2829public function setHeight($height) {30$this->height = $height;31return $this;32}3334public function getHeight() {35return $this->height;36}3738public function setAlt($alt) {39$this->alt = $alt;40return $this;41}4243public function getAlt() {44return $this->alt;45}4647public function addClass($class) {48$this->classes[] = $class;49return $this;50}5152public function render() {53$id = celerity_generate_unique_node_id();5455Javelin::initBehavior(56'remarkup-load-image',57array(58'uri' => (string)$this->uri,59'imageID' => $id,60));6162$classes = null;63if ($this->classes) {64$classes = implode(' ', $this->classes);65}6667return phutil_tag(68'img',69array(70'id' => $id,71'width' => $this->getWidth(),72'height' => $this->getHeight(),73'alt' => $this->getAlt(),74'class' => $classes,75));76}7778}798081