public static function generate(string $key, string $prefix): string
    {
        $key = sprintf('%s_%s', $prefix, static::hash($key));

        static::validate($key, $prefix);

        static::$keys[] = $key;

        return $key;
    }
public static function generate(string $key, string $prefix): string
    {
        $key = sprintf('%s_%s', $prefix, static::hash($key));

        static::validate($key, $prefix);

        static::$keys[] = $key;

        return $key;
    }
public static function generate ( string $ key , string $ prefix ) : string { $ key = sprintf ( '%s_%s' , $ prefix , static :: hash ( $ key ) ) ; static :: validate ( $ key , $ prefix ) ; static :: $ keys [ ] = $ key ; return $ key ; }
Generate a new field, group or layout key.

@param string $key
@param string $prefix

@return string
Generate a new field group or layout key .