Neos\Media\Domain\Model\DimensionsTrait::getOrientation PHP Метод

getOrientation() публичный Метод

Orientation of this image, i.e. portrait, landscape or square
public getOrientation ( ) : string
Результат string One of this interface's ORIENTATION_* constants.
    public function getOrientation()
    {
        $aspectRatio = $this->getAspectRatio(true);
        if ($aspectRatio > 1) {
            return ImageInterface::ORIENTATION_LANDSCAPE;
        } elseif ($aspectRatio < 1) {
            return ImageInterface::ORIENTATION_PORTRAIT;
        } else {
            return ImageInterface::ORIENTATION_SQUARE;
        }
    }