is_customized()) { return ""; } else { return parent::getImageTag($size, $opt); } } /** * Returns the CSS class to use for this avatar image. * * @param string one of the constants Avatar::(NORMAL|MEDIUM|SMALL) * * @return string CSS class to use for the avatar */ protected function getCssClass($size) { return sprintf('license-avatar-%s license-%s', $size, $this->user_id); } /** * Return the default title of the avatar. * @return string the default title */ public function getDefaultTitle() { return License::find($this->user_id)->name; } /** * Return if avatar is visible to the current user. * @return boolean: true if visible */ protected function checkAvatarVisibility() { return true; } /** * Return the dimension of a size * * @param string the dimension of a size * @return array a tupel of integers [width, height] */ public static function getDimension($size) { $dimensions = [ Avatar::NORMAL => [300, 100], Avatar::MEDIUM => [120, 40], Avatar::SMALL => [60, 20] ]; return $dimensions[$size]; } }