protected function setUp() { if (!class_exists('URL')) { Mockery::mock('alias:URL'); } HtmlObject\Image::$urlGenerator = static::getURL(); HtmlObject\Link::$urlGenerator = static::getURL(); static::getURL(); static::getApp(); }
public function getThemeThumbnail() { if (file_exists($this->pThemeDirectory . '/' . FILENAME_THEMES_THUMBNAIL)) { $src = $this->pThemeURL . '/' . FILENAME_THEMES_THUMBNAIL; } else { $src = ASSETS_URL_THEMES_NO_THUMBNAIL; } $html = new \HtmlObject\Image(); $img = $html->src($src)->width(Config::get('concrete.icons.theme_thumbnail.width'))->height(Config::get('concrete.icons.theme_thumbnail.height'))->class('ccm-icon-theme'); return $img; }
<?php defined('C5_EXECUTE') or die("Access Denied."); $c = Page::getCurrentPage(); if (is_object($f)) { if ($maxWidth > 0 || $maxHeight > 0) { $im = Core::make('helper/image'); $thumb = $im->getThumbnail($f, $maxWidth, $maxHeight); //<-- set these 2 numbers to max width and height of thumbnails $tag = new \HtmlObject\Image(); $tag->src($thumb->src)->width($thumb->width)->height($thumb->height); } else { $image = Core::make('html/image', array($f)); $tag = $image->getTag(); } $tag->addClass('ccm-image-block img-responsive bID-' . $bID); if ($altText) { $tag->alt(h($altText)); } if ($title) { $tag->title(h($title)); } if ($linkURL) { print '<a href="' . $linkURL . '">'; } print $tag; if ($linkURL) { print '</a>'; } } else { if ($c->isEditMode()) {