Writes the entity data to an array.
@return array
337927
public function writeData(): array
    {
        $dataBuilder = new DataBuilder();
        $dataBuilder->setString('m', $this->requiredModName, '')
                    ->setString('v', $this->requiredVersion, '')
                    ->setInteger('r', $this->isMandatory ? 1 : 0, 0);
        return $dataBuilder->getData();
    }
968250
public function toArray()
	{
		$output = array();

		foreach ($this->items as $key => $value) {
			array_push($output, $value->toArray(true));
		}

		return array(
			$this->getEntityName() => array(
					$this->getSingularEntityName() => $output
				),
		);
	}
618343
public function toArray()
    {
        return array(
            'name' => $this->_name,
            'type' => $this->_datatype,
            'length' => $this->_length,
            'notnull' => $this->_notnull,
            'default' => $this->_default,
            'autoincrement' => $this->_autoIncrement,
            'comment' => $this->_comment,
        );
    }
1162399
protected function _getData()
    {
        $data = $this->getRepository()->fetch($this->getQuery(), AnDomain::FETCH_ENTITY_LIST);

        return $data;
    }
963322
public function toArray(): array
    {
        return [
            'name' => $this->name,
            'text' => $this->text,
            'style' => $this->style,
            'type' => $this->type,
            'value' => $this->value,
            'confirm' => $this->confirm ? $this->confirm->toArray() : null,
        ];
    }
1336289
public function toArray() : array
    {
        $output = [];
        foreach ($this->data as $key => $val) {
            $output[$key] = $val instanceof ArraySerializable ? $val->toArray() : $val;
        }
        return $output;
    }
467559
public function toArray(): array
    {
        return array_filter([
            'field' => 'uuid.type' === $this->field
                ? null
                : $this->field,
            'values' => $this->values,
            'application_type' => self::AT_LEAST_ONE === $this->applicationType
                ? null
                : $this->applicationType,
            'filter_type' => self::TYPE_FIELD === $this->filterType
                ? null
                : $this->filterType,
            'filter_terms' => $this->filterTerms,
        ], function ($element) {
            return
            !(
                is_null($element) ||
                (is_array($element) && empty($element))
            );
        });
    }
279740
public function getRawAttributes(): array
    {
        $attributes = $this->wrappedEntity->getEntityAttributes();

        foreach ($this->entityMap->getNonEmbeddedRelationships() as $relation) {
            unset($attributes[$relation]);
        }

        if ($this->entityMap->getInheritanceType() == 'single_table') {
            $attributes = $this->addDiscriminatorColumn($attributes);
        }

        $attributes = $this->entityMap->getColumnNamesFromAttributes($attributes);

        $attributes = $this->flattenEmbeddables($attributes);

        $foreignKeys = $this->getForeignKeyAttributes();

        return $this->mergeForeignKeysWithAttributes($foreignKeys, $attributes);
    }
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;
    }
511545
public function toArray()
    {
        return array(
            'id' => $this->getId(),
            'title' => $this->getTitle(),
            'class' => $this->getClass(),
            'iconCls' => $this->getIconClass(),
            'data' => $this->getData(),
            'settings' => $this->getSettings(),
        );
    }
211490
public function toArray() {
		return [
			'key' => $this->key(),
			'url' => $this->url(),
			'formData' => $this->formData(),
			'cacheControl' => $this->cacheControl(),
			'expires' => $this->expires(),
			'acl' => $this->acl()
		];
	}
951101
public function toArray()
    {
        return [
            'prefix' => $this->prefix,
            'entity' => $this->entity,
            'lower_entities' => $this->getLowerEntities(),
            'lower_singular_entity' => $this->getLowerSingularEntity(),
            'studly_entity' => $this->getStudlyEntity(),
            'studly_plural_entity' => $this->getStudlyPluralEntity(),
            'prefix_dot' => $this->getPrefixDot(),
            'prefix_slash' => $this->getPrefixSlash(),
        ];
    }
801012
public function toArray()
    {
        $this->buildGroupsCollection();

        return parent::toArray() + [
                'stub'             => $this->stubElements,
                'name'             => $this->relationName,
                'label'            => $this->label,
                'groups'           => $this->groups,
                'remove'           => $this->toRemove,
                'newEntitiesCount' => $this->new,
                'limit'            => $this->limit,
            ];
    }
1080845
public function saveToEntities()
    {
        $data = $this->transformFromFormData($this->data);

        foreach ($this->entities as $entity) {
            if ($entity['entity'] instanceof EntityInterface) {
                $entity['entity']->setFormData($data, $entity['fields']);
            } else {
                $this->entityProcessor->saveToEntity($entity['entity'], $data, $entity['fields']);
            }
        }
    }
764943
protected function getData()
    {
        $data = [];
        $fields = $this->getDescriptor()->getFields();
        /** @var FieldDescriptor $field */
        foreach ($fields as $field) {
            $data[$field->getField()] = $this->entity->{$field->getName()};
        }
        return $data;
    }
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();
    }
1222610
public function writeData(): array
    {
        $dataBuilder = new DataBuilder();
        $dataBuilder->setString('t', $this->type, '')
                    ->setString('n', $this->name, '')
                    ->setFloat('i', $this->amountMin, 1.)
                    ->setFloat('a', $this->amountMax, 1.)
                    ->setFloat('p', $this->probability, 1.)
                    ->setInteger('o', $this->order, 0);
        return $dataBuilder->getData();
    }