Gets the maker icon image
@var boolean $svg if svgs should be included
@return null|string
556256
public static function getIconImage($svg = true)
    {
        $folders = [
            'client/dist/img/',
            'client/dist/images/',
            'dist/img/',
            'dist/images/',
            'img/',
            'images/',
        ];

        $extensions = [
            'png',
            'jpg',
            'jpeg',
            'gif',
        ];

        if ($svg === true) {
            array_unshift($extensions, 'svg');
        }

        $file = 'mapIcon';

        foreach ($folders as $folder) {
            foreach ($extensions as $extension) {
                if ($icon = ThemeResourceLoader::inst()->findThemedResource(
                    "{$folder}{$file}.{$extension}",
                    SSViewer::get_themes()
                )) {
                    return ModuleResourceLoader::resourceURL($icon);
                }
            }
        }

        return false;
    }
622193
public function getImageResource()
    {
        // Get existing resource
        if ($this->image) {
            return $this->image;
        }

        // Load container
        $assetContainer = $this->getAssetContainer();
        if (!$assetContainer) {
            return null;
        }

        // Avoid repeat load of broken images
        $hash = $assetContainer->getHash();
        $variant = $assetContainer->getVariant();
        if ($this->hasFailed($hash, $variant)) {
            return null;
        }

        // Validate stream is readable
        // Note: Mark failed regardless of whether a failed stream is exceptional or not
        $error = self::FAILED_MISSING;
        try {
            $stream = $assetContainer->getStream();
            if ($this->isStreamReadable($stream)) {
                $error = null;
            } else {
                return null;
            }
        } finally {
            if ($error) {
                $this->markFailed($hash, $variant, $error);
            }
        }

        // Handle resource
        $error = self::FAILED_UNKNOWN;
        try {
            // write the file to a local path so we can extract exif data if it exists.
            // Currently exif data can only be read from file paths and not streams
            $path = tempnam(TEMP_PATH, 'interventionimage_');
            if ($extension = pathinfo($assetContainer->getFilename(), PATHINFO_EXTENSION)) {
                //tmpnam creates a file, we should clean it up if we are changing the path name
                unlink($path);
                $path .= "." . $extension;
            }
            $bytesWritten = file_put_contents($path, $stream);
            // if we fail to write, then load from stream
            if ($bytesWritten === false) {
                $resource = $this->getImageManager()->make($stream);
            } else {
                $this->setTempPath($path);
                $resource = $this->getImageManager()->make($path);
            }

            // Fix image orientation
            try {
                $resource->orientate();
            } catch (NotSupportedException $e) {
                // noop - we can't orientate, don't worry about it
            }

            $this->setImageResource($resource);
            $this->markSuccess($hash, $variant);
            $this->warmCache($hash, $variant);
            $error = null;
            return $resource;
        } catch (NotReadableException $ex) {
            // Handle unsupported image encoding on load (will be marked as failed)
            // Unsupported exceptions are handled without being raised as exceptions
            $error = self::FAILED_INVALID;
        } finally {
            if ($error) {
                $this->markFailed($hash, $variant, $error);
            }
        }
        return null;
    }
612181
public function get($name)
    {
        if (!isset($this->svg[$name])) {
            $this->svg[$name] = new Svg($this->load($name));
        }

        if ($this->svg[$name] !== false) {
            return $this->svg[$name];
        }
    }
780220
public function Image($Img = FALSE) {
      if ($Img) {
         if (!is_array($Img))
            $Img = array($Img);

         $CurrentImages = $this->Data('_Images');
         if (!is_array($CurrentImages))
            $this->SetData('_Images', $Img);
         else {
            $Images = array_unique(array_merge($CurrentImages, $Img));
            $this->SetData('_Images', $Images);
         }
      }
      $Images = $this->Data('_Images');
      return is_array($Images) ? $Images : array();
   }
1034679
public function getIcon()
    {
        if (!$this->icon) {
            return "";
        }
        return Html::get()->image($this->icon, $this->translate($this->label));
    }
1309023
public function getIcon()
    {
        $ini = eZINI::instance( 'eztags.ini' );
        /** @var array $iconMap */
        $iconMap = $ini->variable( 'Icons', 'IconMap' );
        $defaultIcon = $ini->variable( 'Icons', 'Default' );

        if ( $this->attribute( 'main_tag_id' ) > 0 )
            $tag = $this->getMainTag( true );
        else
            $tag = $this;

        $tagID = $tag->attribute( 'id' );
        if ( array_key_exists( $tagID, $iconMap ) && !empty( $iconMap[$tagID] ) )
            return $iconMap[$tagID];

        /** @var eZTagsObject[] $path */
        $path = $tag->getPath( true, true );
        if ( is_array( $path ) && !empty( $path ) )
        {
            foreach ( $path as $pathElement )
            {
                $pathElementID = $pathElement->attribute( 'id' );
                if ( array_key_exists( $pathElementID, $iconMap ) && !empty( $iconMap[$pathElementID] ) )
                    return $iconMap[$pathElementID];
            }
        }

        return $defaultIcon;
    }
414943
public function getThumb()
    {
        $image = $this->node
            ->filter('.item_imagePic .lazyload[data-imgsrc]')
            ->first();

        if (0 === $image->count()) {
            return null;
        }

        $src = $image
            ->attr('data-imgsrc');

        return (string)Http::createFromString($src)->withScheme('https');
    }
728427
public function getIcon()
    {
        $data = ArrayData::create([]);

        $iconClass = $this->config()->get('icon');
        if ($iconClass) {
            $data->IconClass = $iconClass;

            // Add versioned states (rendered as a circle over the icon)
            if ($this->hasExtension(Versioned::class)) {
                $data->IsVersioned = true;
                if ($this->isOnDraftOnly()) {
                    $data->VersionState = 'draft';
                    $data->VersionStateTitle = _t(
                        'SilverStripe\\Versioned\\VersionedGridFieldState\\VersionedGridFieldState.ADDEDTODRAFTHELP',
                        'Item has not been published yet'
                    );
                } elseif ($this->isModifiedOnDraft()) {
                    $data->VersionState = 'modified';
                    $data->VersionStateTitle = $data->VersionStateTitle = _t(
                        'SilverStripe\\Versioned\\VersionedGridFieldState\\VersionedGridFieldState.MODIFIEDONDRAFTHELP',
                        'Item has unpublished changes'
                    );
                }
            }

            return $data->renderWith(__CLASS__ . '/PreviewIcon');
        }

        return null;
    }
1181361
public function placeholder($config = null): string
    {
        $config = array_merge($this->defaults, $config ?? []);

        switch ($config['type']) {
            case 'svg':
                return $this->placeholderSVG($config);
            case 'gif':
                return $this->placeholderGIF($config);
            case 'silhouette':
                return $this->placeholderSilhuette($config);
        }

        return '';
    }
884269
protected function getElementObject($sElementSlug)
    {
        if (empty($sElementSlug)) {
            return null;
        }

        if ($this->isSlugTranslatable()) {
            $obElement = PromoBlock::active()->transWhere('slug', $sElementSlug)->first();
            if (!$this->checkTransSlug($obElement, $sElementSlug)) {
                $obElement = null;
            }
        } else {
            $obElement = PromoBlock::active()->getBySlug($sElementSlug)->first();
        }

        if (!empty($obElement)) {
            Event::fire('shopaholic.promo_block.open', [$obElement]);
        }

        return $obElement;
    }
331809
public function getImage($size = null)
    {
        assert('$this->image');
        if ($size === null) {
            $size = $this->maxSize;
        }
        $icon = imagecreatetruecolor($size, $size);
        $srcSize = $this->tileSize * $this->tiles;
        imagecopyresampled($icon, $this->image, 0, 0, 0, 0, $size, $size, $srcSize, $srcSize);
        return $icon;
    }
797881
protected function getCorpusIcon()
    {
        if ($this->currObj instanceof TeamSpeak3_Node_Channel && $this->currObj->isSpacer()) {
            return;
        }

        return $this->getImage($this->currObj->getIcon() . ".png");
    }
48563
public function getIcon(string $path, $class) : string
    {
        if (file_exists($path . '/assets/icon.svg')) {
            return file_get_contents($path . '/assets/icon.svg');
        }

        // If fail to load (may happen on some systems) TODO: Make this more fancy
        if (file_exists($path . preg_replace('/\s+/', '', ucwords($class->nameSingular)). '/assets/icon.svg')) {
            return file_get_contents($path . preg_replace('/\s+/', '', ucwords($class->nameSingular)). '/assets/icon.svg');
        }

        return '';
    }
849509
public function graphAction($component = null)
    {
        $graphvizService = GeneralUtility::makeInstanceService('graphviz', 'svg');
        if ($graphvizService instanceof GraphvizService) {
            $graph = new Graph(Scanner::discoverAll());

            return $graphvizService->createGraph($graph($component));
        }

        return '<svg xmlns="http://www.w3.org/2000/svg" width="200" height="30" viewBox=".2 -6.2 200 30"><text x="100" y="7" text-anchor="middle" font-family="sans-serif" font-size="11">Component graph cannot be created</text><text x="100" y="17" text-anchor="middle" font-family="sans-serif" font-size="8">Please check your GraphViz installation</text><path fill="none" stroke="#000" stroke-miterlimit="10" d="M199.73 18.133c0 2.75-2.25 5-5 5h-189c-2.75 0-5-2.25-5-5v-19c0-2.75 2.25-5 5-5h189c2.75 0 5 2.25 5 5v19z"/></svg>';
    }
919987
public function getIcon()
    {
        $filename = $this->getFilename();
        $ext = pathinfo($filename, PATHINFO_EXTENSION);
        return File::get_icon_for_extension($ext);
    }
1015766
public function svg()
    {
        if (is_null($this->center) || is_null($this->radius)) {
            throw new \RuntimeException('Before exporting to SVG, you must give center and radius!');
        }

        if ($this->isCircle()) {
            return sprintf(
                '<circle cx="%d" cy="%d" r="%d" fill="%s" />',
                $this->center->x,
                $this->center->y,
                $this->radius->r,
                $this->color
            );
        }

        return sprintf(
            '<ellipse cx="%d" cy="%d" rx="%d" ry="%d" fill="%s" />',
            $this->center->x,
            $this->center->y,
            $this->radius->rx,
            $this->radius->ry,
            $this->color
        );
    }
962814
public function svg( $path = null )
	{
		if( file_exists( $this->imagePath( $path ))) {
			return file_get_contents( $this->imagePath( $path ));
		}
	}