Returns the list data converted as an array.

@return array The list data converted as an array.
@throws \InvalidArgumentException
328608
public function toArray(): array
    {
        $this->internalDataListUpdate();

        // Copied from DataObjectToArrayTrait. Do not modify here !!!
        $toArray = function($object) use (&$toArray) {
            $result = [];
            $vars = get_object_vars($object);
            foreach ($vars as $name => $value) {
                if ($name !== 'internalDataObjectData') {
                    $reflectionProperty = new \ReflectionProperty($object, $name);
                    if ($reflectionProperty->isPublic()) {
                        $result[$name] = null;
                    }
                }
            }
            if (isset($object->internalDataObjectData)) {
                foreach ($object->internalDataObjectData as $name => $value) {
                    $result[substr($name, 1)] = null;
                }
            }
            ksort($result);
            foreach ($result as $name => $null) {
                $value = $object instanceof \ArrayAccess ? $object[$name] : (isset($object->$name) ? $object->$name : null);
                if (is_object($value)) {
                    if (method_exists($value, 'toArray')) {
                        $result[$name] = $value->toArray();
                    } else {
                        if ($value instanceof \DateTime) {
                            $result[$name] = $value->format('c');
                        } else {
                            $propertyVars = $toArray($value);
                            foreach ($propertyVars as $propertyVarName => $propertyVarValue) {
                                if (is_object($propertyVarValue)) {
                                    $propertyVars[$propertyVarName] = $toArray($propertyVarValue);
                                }
                            }
                            $result[$name] = $propertyVars;
                        }
                    }
                } else {
                    $result[$name] = $value;
                }
            }
            return $result;
        };

        $result = [];
        foreach ($this->internalDataListData as $index => $object) {
            $object = $this->internalDataListUpdateValueIfNeeded($this->internalDataListData, $index);
            if (method_exists($object, 'toArray')) {
                $result[] = $object->toArray();
            } else {
                $result[] = $toArray($object);
            }
        }
        return $result;
    }
827327
public function toArray()
    {
        $array = array();

        foreach($this->_data as $key=>$value)
            $array[$key] = ($value instanceof PropertyReference) ? $value->value() : $value;

        return $array;
    }
70991
public function toArray()
    {
        $array = [
            'name'      => $this->getName(),
            'arguments' => $this->getArguments(),
            'children'  => array()
        ];

        foreach ($this->children as $child) {
            $array['children'][] = $child->toArray();
        }
        return $array;
    }
417298
public function toArray()
	{
		$list = parent::toArray();

		$list[$this->_prefix . 'parentid'] = $this->getParentId();
		$list[$this->_prefix . 'typeid'] = $this->getTypeId();
		$list[$this->_prefix . 'type'] = $this->getType();
		$list[$this->_prefix . 'domain'] = $this->getDomain();
		$list[$this->_prefix . 'refid'] = $this->getRefId();
		$list[$this->_prefix . 'datestart'] = $this->getDateStart();
		$list[$this->_prefix . 'dateend'] = $this->getDateEnd();
		$list[$this->_prefix . 'config'] = $this->getConfig();
		$list[$this->_prefix . 'position'] = $this->getPosition();
		$list[$this->_prefix . 'status'] = $this->getStatus();

		return $list;
	}
1114422
public function toArray(): array
    {
        $data = ReflectionUtil::objToSnakeArray($this, static::blacklist());
        foreach ($this->renamed as $name => $newName) {
            if (!array_key_exists($name, $data)) {
                continue;
            }
            $data[$newName] = $data[$name];
            unset($data[$name]);
        }

        return $data;
    }
220876
public function toArray()
    {
        $content = [
            'id' => $this->content->id,
            '_content' => $this->content->toArray(),
            '_revision' => $this->revision->toArray(),
        ];

        foreach ($this->data as $field => $data) {
            $content[$field] = $data->toArray();
        }

        return $content;
    }
691781
public function toArray(){
		$array	= array();
		foreach( $this->data as $key => $node ){
			if( count( $node->data ) )
				$array[$key]	= $node->toArray();
			else
				$array[$key]	= $node->value;
		}
		return $array;
	}
13145
public function toArray()
    {
        $ret = [ ];
        foreach ($this as $key => $value) {
            $ret[ $key ] = $value;
        }
        return $ret;
    }
114462
public function toArray()
	{
		$list = parent::toArray();

		$list['order.base.product.attribute.attrid'] = $this->getAttributeId();
		$list['order.base.product.attribute.productid'] = $this->getProductId();
		$list['order.base.product.attribute.type'] = $this->getType();
		$list['order.base.product.attribute.code'] = $this->getCode();
		$list['order.base.product.attribute.value'] = $this->getValue();
		$list['order.base.product.attribute.name'] = $this->getName();

		return $list;
	}
674896
public function toArray()
	{
		$list	= array();
		foreach( $this->fields as $name => $fields )
			foreach( $fields as $field )
				$list[]	= $field->toString();
		return $list;
	}
148224
public function findAll() : array
    {
        $objectsData = $this->objectDataRepository->findAll();

        $objects = [];
        foreach ($objectsData as $objectData) {
            $object = $this->getOrCreateObject($objectData);

            if ($object === null) {
                throw new InvalidArgumentException('Could not create object.');
            }

            $objects[] = $object;
        }

        return $objects;
    }
1241161
public function exportToArray()
    {
        $data = $this->toArray();

        if (count($this->exportable) === 0) {
            return $data;
        }

        $exportData = [];
        foreach ($data as $key => $value) {
            if (in_array($key, $this->exportable)) {
                $exportData[$key] = $data[$key];
            }
        }
        return $exportData;
    }
1265363
public function toArray(): array
    {
        return array_map(function ($value) {
            if (method_exists($value, 'toArray')) {
                return $value->toArray();
            }

            return $value;
        }, $this->items);
    }
1335228
public function toArray()
    {
        $data = array(
            'domain'      => $this->_domain,
            'type'		  => $this->_type,
            'package'	  => $this->_package,
            'path'		  => $this->_path,
            'name'		  => $this->_name,
        );

        return $data;
    }
1246043
public function toMappedArray()
    {
        $values = $this->toArray();
        $mappedValues = [];
        foreach ($values as $key => $value) {
            $mappedValues[$key] = $this->readMapped($key);
        }

        return $mappedValues;
    }
1043480
public function toArray()
    {
        return array_map(static function ($value) {
            if ($value instanceof ArraySerializableInterface) {
                $value = $value->toArray();
            }
            return $value;
        }, get_object_vars($this));
    }
199043
public function toArray()
	{
		$list = parent::toArray();

		$list['order.base.address.baseid'] = $this->getBaseId();
		$list['order.base.address.addressid'] = $this->getAddressId();
		$list['order.base.address.type'] = $this->getType();

		return $list;
	}