src/Extension/FluentBadgeExtension.php
protected function addFluentBadge($badgeField, DataObject $record)
    {
        // Check for a fluent state before continuing
        if (!FluentState::singleton()->getLocale()
            || !$record->has_extension(FluentVersionedExtension::class)
        ) {
            return null;
        }

        $fluentBadge = $this->getBadge($record);
        // Add fluent badge before any existing badges
        $newBadge = DBField::create_field('HTMLFragment', $fluentBadge . $badgeField);

        return $newBadge;
    }
protected function addFluentBadge($badgeField, DataObject $record)
    {
        // Check for a fluent state before continuing
        if (!FluentState::singleton()->getLocale()
            || !$record->has_extension(FluentVersionedExtension::class)
        ) {
            return null;
        }

        $fluentBadge = $this->getBadge($record);
        // Add fluent badge before any existing badges
        $newBadge = DBField::create_field('HTMLFragment', $fluentBadge . $badgeField);

        return $newBadge;
    }
protected function addFluentBadge ( $ badgeField , DataObject $ record ) { // Check for a fluent state before continuing if ( ! FluentState :: singleton ( ) -> getLocale ( ) || ! $ record -> has_extension ( FluentVersionedExtension :: class ) ) { return null ; } $ fluentBadge = $ this -> getBadge ( $ record ) ; // Add fluent badge before any existing badges $ newBadge = DBField :: create_field ( 'HTMLFragment' , $ fluentBadge . $ badgeField ) ; return $ newBadge ; }
Add the Fluent state badge before any existing badges and return the result

@param DBField|null $badgeField
@param DataObject $record
@return DBField|null
Add the Fluent state badge before any existing badges and return the result