Pimcore\Model\Asset\Image\Thumbnail\Config::getByArrayConfig PHP Method

getByArrayConfig() public static method

public static getByArrayConfig ( $config ) : self
$config
return self
    public static function getByArrayConfig($config)
    {
        $pipe = new self();
        if (isset($config["format"]) && $config["format"]) {
            $pipe->setFormat($config["format"]);
        }
        if (isset($config["quality"]) && $config["quality"]) {
            $pipe->setQuality($config["quality"]);
        }
        if (isset($config["items"]) && $config["items"]) {
            $pipe->setItems($config["items"]);
        }
        if (isset($config["highResolution"]) && $config["highResolution"]) {
            $pipe->setHighResolution($config["highResolution"]);
        }
        // set name
        $hash = md5(Serialize::serialize($pipe));
        $pipe->setName("auto_" . $hash);
        return $pipe;
    }