src/File/ImageOptions.php
public function setResizeFocus(string $resizeFocus = \null)
    {
        $validValues = [
            'face',
            'faces',
            'top',
            'bottom',
            'right',
            'left',
            'top_right',
            'top_left',
            'bottom_right',
            'bottom_left',
        ];

        if (\null !== $resizeFocus && !\in_array($resizeFocus, $validValues, \true)) {
            throw new \InvalidArgumentException(\sprintf(
                'Unknown resize focus "%s" given. Expected "%s" or null.',
                $resizeFocus,
                \implode(', ', $validValues)
            ));
        }

        $this->resizeFocus = $resizeFocus;

        return $this;
    }
public function setResizeFocus(string $resizeFocus = \null)
    {
        $validValues = [
            'face',
            'faces',
            'top',
            'bottom',
            'right',
            'left',
            'top_right',
            'top_left',
            'bottom_right',
            'bottom_left',
        ];

        if (\null !== $resizeFocus && !\in_array($resizeFocus, $validValues, \true)) {
            throw new \InvalidArgumentException(\sprintf(
                'Unknown resize focus "%s" given. Expected "%s" or null.',
                $resizeFocus,
                \implode(', ', $validValues)
            ));
        }

        $this->resizeFocus = $resizeFocus;

        return $this;
    }
public function setResizeFocus ( string $ resizeFocus = \ null ) { $ validValues = [ 'face' , 'faces' , 'top' , 'bottom' , 'right' , 'left' , 'top_right' , 'top_left' , 'bottom_right' , 'bottom_left' , ] ; if ( \ null !== $ resizeFocus && ! \ in_array ( $ resizeFocus , $ validValues , \ true ) ) { throw new \ InvalidArgumentException ( \ sprintf ( 'Unknown resize focus "%s" given. Expected "%s" or null.' , $ resizeFocus , \ implode ( ', ' , $ validValues ) ) ) ; } $ this -> resizeFocus = $ resizeFocus ; return $ this ; }
Set the focus area when the resize fit is set to 'thumb'.

Possible values are:
- 'top', 'right', 'left', 'bottom'
- A combination like 'bottom_right'
- 'face' or 'faces' to focus the resizing via face detection

@param string|null $resizeFocus

@throws \InvalidArgumentException For unknown values of $resizeFocus

@return $this
Set the focus area when the resize fit is set to thumb .