Writes the entity data to an array.
@return array
542832
public function writeData(): array
    {
        $dataBuilder = new DataBuilder();
        $dataBuilder->setString('n', $this->name, '')
                    ->setString('m', $this->mode, '')
                    ->setArray('i', $this->ingredients, function (Ingredient $ingredient): array {
                        return $ingredient->writeData();
                    }, [])
                    ->setArray('p', $this->products, function (Product $product): array {
                        return $product->writeData();
                    }, [])
                    ->setFloat('c', $this->craftingTime, 0.)
                    ->setString('a', $this->craftingCategory, '')
                    ->setArray('l', $this->labels->writeData(), null, [])
                    ->setArray('d', $this->descriptions->writeData(), null, [])
                    ->setString('h', $this->iconHash, '');
        return $dataBuilder->getData();
    }
544822
public function toArray()
	{
		return array(
			'address'		=> $this->types['adr'],
			'email'			=> $this->types['email'],
			'formatedName'	=> $this->types['fn'],
			'geo'			=> $this->types['geo'],
			'name'			=> $this->types['n'],
			'nickname'		=> $this->types['nickname'],
			'organisation'	=> $this->types['org'],
			'role'			=> $this->types['role'],
			'telephone'		=> $this->types['tel'],
			'title'			=> $this->types['title'],
			'url'			=> $this->types['url'],
		);
	}
742069
public function writeData(): array
    {
        $dataBuilder = new DataBuilder();
        $dataBuilder->setString('t', $this->type, '')
                    ->setString('n', $this->name, '')
                    ->setArray('l', $this->labels->writeData(), null, [])
                    ->setArray('d', $this->descriptions->writeData(), null, [])
                    ->setInteger('r', $this->providesRecipeLocalisation ? 1 : 0, 0)
                    ->setInteger('m', $this->providesMachineLocalisation ? 1 : 0, 0)
                    ->setString('i', $this->iconHash, '')
                    ->setInteger('e', $this->isNew ? 1 : 0, 1);
        return $dataBuilder->getData();
    }
348388
public function toArray()
	{
		$output = $this->getAttributes();

		foreach ($this->relationships as $key => $value) {

			if ($value instanceof BaseModel) {
				$value = array($value->getSingularEntityName() => $value->toArray());
			}
			else {
				$value = $value->toArray();
			}

			$output = array_merge($output, $value);
		}

		return $output;
	}
1038304
public function toArray()
    {
        $data = parent::toArray();

        $data = array_intersect_key($data, $this->_fields);

        return $data;
    }
572697
public function toArray()
    {
        return array(
            'AllFields'        => $this->allFields,
            'Interest'         => $this->interest,
            'LastModifiedOnly' => $this->lastModifiedOnly,
            'Offset'           => $this->offset,
            'RequestFilter'    => $this->requestFilter->toArray(),
            'ReturnFields'     => $this->returnFields,
        );
    }
23094
protected function buildUpData()
    {
        $data   = [];
        $fields = $this->definition->getEditableFieldNames();
        foreach ($fields as $field) {
            $data[$field] = $this->entity->getRaw($field);
            $fixed        = $this->definition->getField($field, 'value');
            if ($fixed) {
                $data[$field] = $fixed;
            }
        }
        return $data;
    }
641957
public function toArray() : array
    {
        $output = [];
        foreach ($this->entries as $entry) {
            $output[] = $entry instanceof ArraySerializable ? $entry->toArray() : $entry;
        }
        return $output;
    }
95942
public function toArray()
    {
        return [
            'rowId'    => $this->rowId,
            'id'       => $this->id,
            'name'     => $this->name,
            'qty'      => $this->qty,
            'price'    => $this->price,
            'options'  => $this->options->toArray(),
            'tax'      => $this->tax,
            'subtotal' => $this->subtotal
        ];
    }
820597
public function toArray()
    {
        return [
            'id'            => (int) $this->iId ?: null,
            'label'         => $this->sLabel,
            'body'          => $this->sBody,
            'unit'          => $this->iUnit,
            'tax_id'        => (int) $this->iTaxId ?: null,
            'quantity'      => (int) $this->iQuantity ?: 0,
            'unit_cost'     => (int) $this->iUnitCost ?: 0,
            'callback_data' => $this->mCallbackData,
        ];
    }
879897
public function toArray()
    {
        $data = array();
        foreach ($this->violations as $violation) {
            $data[] = $violation->getMessage();
        }

        return $data;
    }
226079
public function toArray()
	{
		$this->data = $this->transformer->transformBack($this->data);

		return $this->data;
	}
352453
public function toArray()
    {
        $data = $this->getAttributes();

        if (!$this->hasId()) {
            unset($data[$this->uniqueIdField]);
        } else {
            $data[$this->uniqueIdField] = $this->getId();
        }

        if($children = $this->getChildren()){
           $_children = array();
            foreach($children as $child){
               $_children[] = $child->toArray();
           }
            $data["children"] = &$_children;
        }

        return $data;
    }
281560
public function toArray()
    {
        $data = [
            'name' => $this->name,
            'type' => $this->type,
            'description' => $this->description
        ];

        if (null !== $this->child) {
            $data['properties'] = [];

            foreach ($this->child as $child) {
                $data['properties'][$child->getName()] = $child->toArray();
            }
        }

        return $data;
    }
19753
public function toArray(): array
    {
        return [
            'id'                => $this->id,
            'text'              => $this->text,
            'lang'              => $this->lang,
            'created_at'        => $this->createdAt,
            'geo'               => $this->geo,
            'coordinates'       => $this->coordinates,
            'places'            => $this->places,
            'retweet_count'     => $this->retweetCount,
            'favorite_count'    => $this->favoriteCount,
            'entities'          => $this->entities,
            'extended_entities' => $this->extendedEntities,
            'user'              => $this->user
        ];
    }
849168
public function toArray(): array
    {
        $result = $this->orgData;
        foreach ($this->addAttributes as $key => $value) {
            $result[$key] = $value;
        }
        foreach ($this->updateAttributes as $key => $value) {
            $result[$key] = $value;
        }
        foreach ($this->removeAttributes as $key => $value) {
            unset($result[$key]);
        }
        return $result;
    }
980797
public function writeData(): array
    {
        $dataBuilder = new DataBuilder();
        $dataBuilder->setString('n', $this->name, '')
                    ->setArray('l', $this->labels->writeData(), null, [])
                    ->setArray('d', $this->descriptions->writeData(), null, [])
                    ->setArray('c', array_values(array_unique($this->craftingCategories)), 'strval', [])
                    ->setFloat('s', $this->craftingSpeed, 1.)
                    ->setInteger('i', $this->numberOfItemSlots, 0)
                    ->setInteger('f', $this->numberOfFluidInputSlots, 0)
                    ->setInteger('u', $this->numberOfFluidOutputSlots, 0)
                    ->setInteger('m', $this->numberOfModuleSlots, 0)
                    ->setFloat('e', $this->energyUsage, 0.)
                    ->setString('r', $this->energyUsageUnit, 'W')
                    ->setString('o', $this->iconHash, '');
        return $dataBuilder->getData();
    }