protected function get_protected_field(string $prefix = '') : \stdClass {
        $fieldname = "{$prefix}protected";

        return (object) [
            'fields' => [
                $this->_form->createElement(
                        'advcheckbox',
                        $fieldname,
                        get_string('protected', 'tool_dataprivacy'),
                        get_string('protectedlabel', 'tool_dataprivacy')
                    ),
            ],
        ];
    }
protected function get_protected_field(string $prefix = '') : \stdClass {
        $fieldname = "{$prefix}protected";

        return (object) [
            'fields' => [
                $this->_form->createElement(
                        'advcheckbox',
                        $fieldname,
                        get_string('protected', 'tool_dataprivacy'),
                        get_string('protectedlabel', 'tool_dataprivacy')
                    ),
            ],
        ];
    }
protected function get_protected_field ( string $ prefix = '' ) : \ stdClass { $ fieldname = "{$prefix}protected" ; return ( object ) [ 'fields' => [ $ this -> _form -> createElement ( 'advcheckbox' , $ fieldname , get_string ( 'protected' , 'tool_dataprivacy' ) , get_string ( 'protectedlabel' , 'tool_dataprivacy' ) ) , ] , ] ; }
Get the mform field for the protected flag.

@param   string  $prefix The prefix to apply to the field
@return  \stdClass
Get the mform field for the protected flag .