public function serialize(SearchCondition $searchCondition): array
    {
        $setName = $searchCondition->getFieldSet()->getSetName();

        return [$setName, serialize($searchCondition->getValuesGroup())];
    }
public function serialize(SearchCondition $searchCondition): array
    {
        $setName = $searchCondition->getFieldSet()->getSetName();

        return [$setName, serialize($searchCondition->getValuesGroup())];
    }
public function serialize ( SearchCondition $ searchCondition ) : array { $ setName = $ searchCondition -> getFieldSet ( ) -> getSetName ( ) ; return [ $ setName , serialize ( $ searchCondition -> getValuesGroup ( ) ) ] ; }
Serialize a SearchCondition.

The returned value is an array you can safely serialize yourself.
This is not done already because storing a serialized SearchCondition
in a php session would serialize the serialized result again.

Caution: The FieldSet must be loadable from the factory.

@return array [FieldSet-name, serialized ValuesGroup object]
Serialize a SearchCondition .