protected function generateName()
    {
        do {
            // Generate a new random name after this class (handles namespaces)
            $classNamePieces = explode('\\', static::class);
            $class = array_pop($classNamePieces);
            $entropy = substr(sha1(uniqid()), 0, 5);
            $name = "{$class}_{$entropy}";

            // Check if it conflicts
            $exists = EditableFormField::get()->filter('Name', $name)->count() > 0;
        } while ($exists);
        return $name;
    }
protected function generateName()
    {
        do {
            // Generate a new random name after this class (handles namespaces)
            $classNamePieces = explode('\\', static::class);
            $class = array_pop($classNamePieces);
            $entropy = substr(sha1(uniqid()), 0, 5);
            $name = "{$class}_{$entropy}";

            // Check if it conflicts
            $exists = EditableFormField::get()->filter('Name', $name)->count() > 0;
        } while ($exists);
        return $name;
    }
protected function generateName ( ) { do { // Generate a new random name after this class (handles namespaces) $ classNamePieces = explode ( '\\' , static :: class ) ; $ class = array_pop ( $ classNamePieces ) ; $ entropy = substr ( sha1 ( uniqid ( ) ) , 0 , 5 ) ; $ name = "{$class}_{$entropy}" ; // Check if it conflicts $ exists = EditableFormField :: get ( ) -> filter ( 'Name' , $ name ) -> count ( ) > 0 ; } while ( $ exists ) ; return $ name ; }
Generate a new non-conflicting Name value

@return string
Generate a new non - conflicting Name value