Pimcore\Model\Asset\Image::getFormat PHP Method

getFormat() public method

public getFormat ( ) : string
return string
    public function getFormat()
    {
        if ($this->getWidth() > $this->getHeight()) {
            return "landscape";
        } elseif ($this->getWidth() == $this->getHeight()) {
            return "square";
        } elseif ($this->getHeight() > $this->getWidth()) {
            return "portrait";
        }
        return "unknown";
    }