public function normalize($widget): void
    {
        $contextAs = 'data';
        if (property_exists($widget, 'contextAs')) {
            // removes the $ sign.
            $contextAs = str_replace('$', '', (string) $widget->contextAs);
        }
        $widget->contextAs = $contextAs;
    }
public function normalize($widget): void
    {
        $contextAs = 'data';
        if (property_exists($widget, 'contextAs')) {
            // removes the $ sign.
            $contextAs = str_replace('$', '', (string) $widget->contextAs);
        }
        $widget->contextAs = $contextAs;
    }
public function normalize ( $ widget ) : void { $ contextAs = 'data' ; if ( property_exists ( $ widget , 'contextAs' ) ) { // removes the $ sign. $ contextAs = str_replace ( '$' , '' , ( string ) $ widget -> contextAs ) ; } $ widget -> contextAs = $ contextAs ; }
Figures out what the variable name should be in view file.

@param object $widget
@return void
Figures out what the variable name should be in view file .