src/Backend/Modules/Commerce/Domain/Category/Category.php
/**
     * Update the widget so it shows the correct title and has the correct template.
     */
Update the widget so it shows the correct title and has the correct template.
Update the widget so it shows the correct title and has the correct template .
private function updateWidget(): void
    {
        $editUrl = Model::createUrlForAction('EditCategory', 'Commerce', (string) $this->locale) . '&id=' . $this->id;
        $extras = Model::getExtras([$this->extraId]);
        $extra = reset($extras);
        $data = [
            'id' => $this->id,
            'language' => (string) $this->locale,
            'edit_url' => $editUrl,
        ];
        if (isset($extra['data'])) {
            $data = $data + (array) $extra['data'];
        }
        Language::setLocale(Language::getWorkingLanguage());
        $data['extra_label'] = ucfirst(Language::lbl('Category', 'Commerce')) . ' - ' . $this->title;
        Model::updateExtra($this->extraId, 'data', $data);
    }
private function updateWidget ( ) : void { $ editUrl = Model :: createUrlForAction ( 'EditCategory' , 'Commerce' , ( string ) $ this -> locale ) . '&id=' . $ this -> id ; $ extras = Model :: getExtras ( [ $ this -> extraId ] ) ; $ extra = reset ( $ extras ) ; $ data = [ 'id' => $ this -> id , 'language' => ( string ) $ this -> locale , 'edit_url' => $ editUrl , ] ; if ( isset ( $ extra [ 'data' ] ) ) { $ data = $ data + ( array ) $ extra [ 'data' ] ; } Language :: setLocale ( Language :: getWorkingLanguage ( ) ) ; $ data [ 'extra_label' ] = ucfirst ( Language :: lbl ( 'Category' , 'Commerce' ) ) . ' - ' . $ this -> title ; Model :: updateExtra ( $ this -> extraId , 'data' , $ data ) ; }
Update the widget so it shows the correct title and has the correct template.
Update the widget so it shows the correct title and has the correct template .
// update data for the extra // @TODO replace this with an implementation with doctrine