public function updateFormFields(FieldList $fields, $controller, $formName, $context)
    {
        $image = isset($context['Record']) ? $context['Record'] : null;
        if ($image && $image->appCategory() === 'image') {
            $fields->insertAfter(
                'Title',
                FocusPointField::create('FocusPoint', $image->fieldLabel('FocusPoint'), $image)
                    ->setReadonly($formName === 'fileSelectForm')
            );
        }
    }
public function updateFormFields(FieldList $fields, $controller, $formName, $context)
    {
        $image = isset($context['Record']) ? $context['Record'] : null;
        if ($image && $image->appCategory() === 'image') {
            $fields->insertAfter(
                'Title',
                FocusPointField::create('FocusPoint', $image->fieldLabel('FocusPoint'), $image)
                    ->setReadonly($formName === 'fileSelectForm')
            );
        }
    }
public function updateFormFields ( FieldList $ fields , $ controller , $ formName , $ context ) { $ image = isset ( $ context [ 'Record' ] ) ? $ context [ 'Record' ] : null ; if ( $ image && $ image -> appCategory ( ) === 'image' ) { $ fields -> insertAfter ( 'Title' , FocusPointField :: create ( 'FocusPoint' , $ image -> fieldLabel ( 'FocusPoint' ) , $ image ) -> setReadonly ( $ formName === 'fileSelectForm' ) ) ; } }
Add FocusPoint field for selecting focus.
Add FocusPoint field for selecting focus .