protected function convertPropertiesToQueryArray(PropertiesInterface $properties)
    {
        $propertiesArray = [];

        $propertyCounter = 0;
        $propertiesArray[Constants::CONTROL_PROP_ID] = [];
        $propertiesArray[Constants::CONTROL_PROP_VALUE] = [];
        foreach ($properties->getProperties() as $property) {
            $propertiesArray[Constants::CONTROL_PROP_ID][$propertyCounter] = $property->getId();

            $propertyValues = $property->getValues();

            if (count($propertyValues) === 1) {
                $propertiesArray[Constants::CONTROL_PROP_VALUE][$propertyCounter] =
                    $this->convertPropertyValueToSimpleType(
                        $property->getFirstValue()
                    );
            } elseif (count($propertyValues) > 1) {
                $propertyValueCounter = 0;
                $propertiesArray[Constants::CONTROL_PROP_VALUE][$propertyCounter] = [];
                foreach ($propertyValues as $propertyValue) {
                    $propertiesArray[Constants::CONTROL_PROP_VALUE][$propertyCounter][$propertyValueCounter] =
                        $this->convertPropertyValueToSimpleType(
                            $propertyValue
                        );
                    $propertyValueCounter ++;
                }
            }

            $propertyCounter ++;
        }

        return $propertiesArray;
    }