public function createImage($src, $alt = '')
    {
        /* @var $img \Core\Html\Elements\Img */
        $img = $this->factory->create('Elements\Img');
        $img->setSrc($src);

        if (! empty($alt)) {
            $img->setAlt($alt);
        }

        return $this->content = $img;
    }
public function createImage($src, $alt = '')
    {
        /* @var $img \Core\Html\Elements\Img */
        $img = $this->factory->create('Elements\Img');
        $img->setSrc($src);

        if (! empty($alt)) {
            $img->setAlt($alt);
        }

        return $this->content = $img;
    }
public function createImage ( $ src , $ alt = '' ) { /* @var $img \Core\Html\Elements\Img */ $ img = $ this -> factory -> create ( 'Elements\Img' ) ; $ img -> setSrc ( $ src ) ; if ( ! empty ( $ alt ) ) { $ img -> setAlt ( $ alt ) ; } return $ this -> content = $ img ; }
Creates a brand imageobject and returns reference.

@param string $src
@param string $alt Optional

@return \Core\Html\Elements\Img
Creates a brand imageobject and returns reference .