protected function elementClass(string $var_name = ''): string
    {
        if ($this->action) {
            return $this->s::restActionFormElementClass($var_name);
        } elseif ($this->cfg->Widget) {
            return $this->cfg->Widget->get_field_id($var_name);
        }
        return $this->cfg->slug.($var_name ? '-'.$this->c::nameToSlug($var_name) : '');
    }
protected function elementClass(string $var_name = ''): string
    {
        if ($this->action) {
            return $this->s::restActionFormElementClass($var_name);
        } elseif ($this->cfg->Widget) {
            return $this->cfg->Widget->get_field_id($var_name);
        }
        return $this->cfg->slug.($var_name ? '-'.$this->c::nameToSlug($var_name) : '');
    }
protected function elementClass ( string $ var_name = '' ) : string { if ( $ this -> action ) { return $ this -> s :: restActionFormElementClass ( $ var_name ) ; } elseif ( $ this -> cfg -> Widget ) { return $ this -> cfg -> Widget -> get_field_id ( $ var_name ) ; } return $ this -> cfg -> slug . ( $ var_name ? '-' . $ this -> c :: nameToSlug ( $ var_name ) : '' ) ; }
Form element class.

@since 160723 Menu page utils.

@param string $var_name Var name.

@return string Form element class.
Form element class .