common/utilities/CodeGenUtil.php
public static function getImageThumbTag( $image, $options = [] ) {

		// Use Image from DB
		if( isset( $image ) ) {

			$thumbUrl = $image->getThumbUrl();

			if( isset( $options[ 'class' ] ) ) {

				$class = $options[ 'class' ];

				return "<img class='$class' src='$thumbUrl'>";
			}
			else {

				return "<img src='$thumbUrl'>";
			}
		}
		else {

			// Use Image from web root directory
			if( isset( $options[ 'image' ] ) ) {

				$images = Yii::getAlias( '@images' );
				$img	= $options[ 'image' ];

				if( isset( $options[ 'class' ] ) ) {

					$class	= $options[ 'class' ];

					return "<img class='$class' src='$images/$img'>";
				}
				else {

					return "<img src='$images/$img'>";
				}
			}
			// Use icon
			else if( isset( $options[ 'icon' ] ) ) {

				$icon = $options[ 'icon' ];

				return "<span class='$icon'></span>";
			}
		}
	}
public static function getImageThumbTag( $image, $options = [] ) {

		// Use Image from DB
		if( isset( $image ) ) {

			$thumbUrl = $image->getThumbUrl();

			if( isset( $options[ 'class' ] ) ) {

				$class = $options[ 'class' ];

				return "<img class='$class' src='$thumbUrl'>";
			}
			else {

				return "<img src='$thumbUrl'>";
			}
		}
		else {

			// Use Image from web root directory
			if( isset( $options[ 'image' ] ) ) {

				$images = Yii::getAlias( '@images' );
				$img	= $options[ 'image' ];

				if( isset( $options[ 'class' ] ) ) {

					$class	= $options[ 'class' ];

					return "<img class='$class' src='$images/$img'>";
				}
				else {

					return "<img src='$images/$img'>";
				}
			}
			// Use icon
			else if( isset( $options[ 'icon' ] ) ) {

				$icon = $options[ 'icon' ];

				return "<span class='$icon'></span>";
			}
		}
	}
public static function getImageThumbTag ( $ image , $ options = [ ] ) { // Use Image from DB if ( isset ( $ image ) ) { $ thumbUrl = $ image -> getThumbUrl ( ) ; if ( isset ( $ options [ 'class' ] ) ) { $ class = $ options [ 'class' ] ; return "<img class='$class' src='$thumbUrl'>" ; } else { return "<img src='$thumbUrl'>" ; } } else { // Use Image from web root directory if ( isset ( $ options [ 'image' ] ) ) { $ images = Yii :: getAlias ( '@images' ) ; $ img = $ options [ 'image' ] ; if ( isset ( $ options [ 'class' ] ) ) { $ class = $ options [ 'class' ] ; return "<img class='$class' src='$images/$img'>" ; } else { return "<img src='$images/$img'>" ; } } // Use icon else if ( isset ( $ options [ 'icon' ] ) ) { $ icon = $ options [ 'icon' ] ; return "<span class='$icon'></span>" ; } } }
Return Image Tag
Return Image Tag