Get all the image formats.

@return string[]
193336
public function getAllImageFormats()
    {
        if ($this->allImageFormats === null) {
            $this->allImageFormats = [
                static::FORMAT_PNG,
                static::FORMAT_JPEG,
                static::FORMAT_GIF,
                static::FORMAT_WBMP,
                static::FORMAT_XBM,
            ];
        }

        return $this->allImageFormats;
    }
710002
public function getAllDateFormatFlat()
    {
        $aOut     = [];
        $aFormats = $this->getAllDateFormat();

        foreach ($aFormats as $oFormat) {
            $aOut[$oFormat->slug] = $oFormat->example;
        }

        return $aOut;
    }
434327
protected function getImageSizeList()
	{
		$arrSizes = \System::getContainer()->get('contao.image.image_sizes')->getAllOptions();

		if (is_array($arrList = \StringUtil::deserialize($this->sizeList)))
		{
			$arrSizes['image_sizes'] = array_intersect_key($arrSizes['image_sizes'], array_flip($arrList));
		}
		else
		{
			$arrSizes['image_sizes'] = array();
		}

		if ($this->canEnterSize)
		{
			return $arrSizes;
		}
		
		return $arrSizes['image_sizes'];
	}
885040
public function getSortedImages()
    {
        $imagesSort = explode(',', $this->getImagesSort());
        $orderCollection = array_reverse($imagesSort);
        $imagesCollection = $this
            ->getImages()
            ->toArray();

        usort(
            $imagesCollection,
            function (
                \Elcodi\Component\Media\Entity\Interfaces\ImageInterface $a,
                \Elcodi\Component\Media\Entity\Interfaces\ImageInterface $b
            ) use ($orderCollection) {

                $aPos = array_search($a->getId(), $orderCollection);
                $bPos = array_search($b->getId(), $orderCollection);

                return ($aPos < $bPos)
                    ? 1
                    : -1;
            }
        );

        return new ArrayCollection($imagesCollection);
    }
396960
protected function get_media_types() {
		$media_types = array();
		foreach ( get_allowed_mime_types() as $mime_type ) {
			$parts = explode( '/', $mime_type );
			if ( ! isset( $media_types[ $parts[0] ] ) ) {
				$media_types[ $parts[0] ] = array();
			}
			$media_types[ $parts[0] ][] = $mime_type;
		}
		return $media_types;
	}
581936
public function getImageTitleOptions()
    {
        return [
            self::IMAGE_TITLE_NONE => _t(__CLASS__ . '.NONE', 'None'),
            self::IMAGE_TITLE_MEDIA => _t(__CLASS__ . '.MEDIATITLE', 'Media Title'),
            self::IMAGE_TITLE_COMPONENT => _t(__CLASS__ . '.COMPONENTTITLE', 'Component Title')
        ];
    }
1007113
public function getBannerImageSizes()
    {
        $sizes = array();
        $imageSize = $this->Database
                            ->prepare("SELECT id, name, width, height FROM tl_image_size ORDER BY pid, name")
                            ->execute(\Input::get('id'));
        while ($imageSize->next())
        {
            $sizes[$imageSize->id] = $imageSize->name;
            $sizes[$imageSize->id] .= ' (' . $imageSize->width . 'x' . $imageSize->height . ')';
        }
        return array_merge(array('image_sizes'=>$sizes), $GLOBALS['TL_CROP']);
    }
319686
public function getImages() {
    	// Sort array
    	$images = array();
    	if (isset($this->_headerFooterImages[self::IMAGE_HEADER_LEFT])) 	$images[self::IMAGE_HEADER_LEFT] = 		$this->_headerFooterImages[self::IMAGE_HEADER_LEFT];
    	if (isset($this->_headerFooterImages[self::IMAGE_HEADER_CENTER])) 	$images[self::IMAGE_HEADER_CENTER] = 	$this->_headerFooterImages[self::IMAGE_HEADER_CENTER];
    	if (isset($this->_headerFooterImages[self::IMAGE_HEADER_RIGHT])) 	$images[self::IMAGE_HEADER_RIGHT] = 	$this->_headerFooterImages[self::IMAGE_HEADER_RIGHT];
    	if (isset($this->_headerFooterImages[self::IMAGE_FOOTER_LEFT])) 	$images[self::IMAGE_FOOTER_LEFT] = 		$this->_headerFooterImages[self::IMAGE_FOOTER_LEFT];
    	if (isset($this->_headerFooterImages[self::IMAGE_FOOTER_CENTER])) 	$images[self::IMAGE_FOOTER_CENTER] = 	$this->_headerFooterImages[self::IMAGE_FOOTER_CENTER];
    	if (isset($this->_headerFooterImages[self::IMAGE_FOOTER_RIGHT])) 	$images[self::IMAGE_FOOTER_RIGHT] = 	$this->_headerFooterImages[self::IMAGE_FOOTER_RIGHT];
    	$this->_headerFooterImages = $images;

    	return $this->_headerFooterImages;
    }
234328
public function getFormats()
    {
        return array(
            Format\HtmlFormat::FORMAT_NAME,
            Format\ConsoleFormat::FORMAT_NAME,
            Format\TextFormat::FORMAT_NAME,
            Format\JsonFormat::FORMAT_NAME,
            Format\XmlFormat::FORMAT_NAME,
            Format\YamlFormat::FORMAT_NAME,
            Format\PhpFormat::FORMAT_NAME
        );
    }
125404
public function getFilterFormats() {
    $options = [];
    $formats = filter_formats($this->currentUser);
    foreach ($formats as $format) {
      $options[$format->id()] = $format->label();
    }
    return $options;
  }
754974
public function getImageAlignmentClassNames()
    {
        $classes = [];
        
        $alignment = $this->owner->dbObject('ImageAlignment');
        
        foreach ($alignment->getViewports() as $viewport) {
            $classes[] = $this->getImageAlignmentClass($viewport, $alignment->getField($viewport));
        }
        
        return $classes;
    }
83737
public function getAllFiles()
    {
        $ext   = $this->formatter->getFileExtension();
        $files = array();
        $this->getFilesRecursive($this->path, $files, $ext);

        return $files;
    }
1070538
public static function getFormats() : array
    {
        return [
            self::FORMAT_GSM => self::FORMAT_GSM,
            self::FORMAT_UNICODE => self::FORMAT_UNICODE,
            self::FORMAT_BINARY => self::FORMAT_BINARY,
            self::FORMAT_WAPPUSH => self::FORMAT_WAPPUSH,
            self::FORMAT_MMS => self::FORMAT_MMS
        ];
    }
1308816
public function stylesAll(): array
    {
        $styles = [];
        foreach ($this->getAll() as $name => $plugin) {
            $styles[$name] = $plugin->styles();
        }
        return $styles;
    }
84308
protected function getImagesWithResizes()
    {
        // first get the images through the relation
        $relation = $this->getRelationForImagesWithResizesCaller();

        $images = $this->{$relation}()->get();

        if (empty($images)) return $images;

        // then get extra info and retrieve the resizes for it
        $fieldId = $this->getCmsReferenceFieldId($relation);

        $resizes = $this->getResizesForFieldId($fieldId);

        if (empty($resizes)) return $images;

        // decorate the images with resizes
        foreach ($images as $image) {

            $fileName = $image->file;
            $imageResizes = [];

            foreach ($resizes as $resize) {

                $imageResizes[ $resize->prefix ] = [
                    'id'     => $resize->id,
                    'prefix' => $resize->prefix,
                    'file'   => $resize->prefix . $fileName,
                    'url'    => Paths::images($resize->prefix . $fileName),
                    'width'  => $resize->width,
                    'height' => $resize->height,
                ];
            }

            // append full resizes info
            $image->resizes = $imageResizes;
        }

        return $images;
    }
434918
public function getImageAlignmentOptions()
    {
        return [
            self::ALIGN_LEFT   => _t(__CLASS__ . '.LEFT', 'Left'),
            self::ALIGN_CENTER => _t(__CLASS__ . '.CENTER', 'Center'),
            self::ALIGN_RIGHT  => _t(__CLASS__ . '.RIGHT', 'Right')
        ];
    }
588739
public function getList()
    {
        $imagestyles = &gplcart_static('image.style.list');

        if (isset($imagestyles)) {
            return (array) $imagestyles;
        }

        $this->hook->attach('image.style.list.before', $imagestyles, $this);

        if (isset($imagestyles)) {
            return (array) $imagestyles;
        }

        $default = (array) gplcart_config_get(GC_FILE_CONFIG_IMAGE_STYLE);
        $saved = $this->config->get('imagestyles', array());
        $imagestyles = array_replace_recursive($default, $saved);

        foreach ($imagestyles as $imagestyle_id => &$imagestyle) {
            $imagestyle['imagestyle_id'] = $imagestyle_id;
            $imagestyle['default'] = isset($default[$imagestyle_id]);
            $imagestyle['in_database'] = isset($saved[$imagestyle_id]);
        }

        $this->hook->attach('image.style.list.after', $imagestyles, $this);
        return (array) $imagestyles;
    }