Convert the model's attributes to an array.

@return array
517984
public function attributesToArray()
    {
        $attributes = $this->getArrayableAttributes();
        $mutatedAttributes = $this->getMutatedAttributes();
        // We want to spin through all the mutated attributes for this model and call
        // the mutator for the attribute. We cache off every mutated attributes so
        // we don't have to constantly check on attributes that actually change.
        foreach ($mutatedAttributes as $key) {
            $key = self::caseFormat($key);
            if (!array_key_exists($key, $attributes)) {
                continue;
            }
            $attributes[$key] = $this->mutateAttributeForArray(
                $key, $attributes[$key]
            );
        }
        // Next we will handle any casts that have been setup for this model and cast
        // the values to their appropriate type. If the attribute has a mutator we
        // will not perform the cast on those attributes to avoid any confusion.
        foreach ($this->casts as $key => $value) {
            $key = self::caseFormat($key);
            if (!array_key_exists($key, $attributes) ||
                in_array($key, $mutatedAttributes)
            ) {
                continue;
            }
            $attributes[$key] = $this->castAttribute(
                $key, $attributes[$key]
            );
        }
        // Here we will grab all of the appended, calculated attributes to this model
        // as these attributes are not really in the attributes array, but are run
        // when we need to array or JSON the model for convenience to the coder.
        foreach ($this->getArrayableAppends() as $key) {
            $key = self::caseFormat($key);
            $attributes[$key] = $this->mutateAttributeForArray($key, null);
        }

        return static::$filterNullValues
            ? array_filter($attributes, function($value) {
                return !is_null($value);
            })
            : $attributes;
    }
169451
public function toArray()
    {
        $fieldValues = [];
        foreach ($this->fields as $group) {
            foreach ($group as $name => $field) {
                $fieldValues[$name] = $field->getValue();
            }
        }
        return $fieldValues;
    }
96995
public function toArray(){
        $ModelArray = [];
        foreach( get_object_vars( $this) as $propertyName => $propertyValue){
            if( is_subclass_of( $propertyValue, Model::class)){
                /** @var $propertyValue Model */
                $ModelArray[$propertyName] = $propertyValue->toArray();
            } else {
                $ModelArray[$propertyName] = $propertyValue;
            }
        }
        return $ModelArray;
    }
827004
public function toArray()
    {
        $attributes = [];

        foreach ($this->fillable as $attribute)
        {
            $attributes[$attribute] = $this->getAttributeFromArray($attribute);
        }

        return $attributes;
    }
477140
public function toArray()
    {
        return array(
            'id' => $this->getId(),
            'rule' => $this->getRule(),
            'description' => $this->getDescription(),
            'tags' => implode(', ', $this->getTags()),
            'impact' => $this->getImpact()
        );
    }
1174793
public function toArray()
    {
        $data = [$this->_getBaseName() => $this->getParams()];

        if (!empty($this->_rawParams)) {
            $data = \array_merge($data, $this->_rawParams);
        }

        return $this->_convertArrayable($data);
    }
952319
public function toArray()
	{
		return [
			'points' => SerializationHelper::serialize($this->points),
			'extensions' => SerializationHelper::serialize($this->extensions),
			'stats' => SerializationHelper::serialize($this->stats)
		];
	}
1345106
public function toArray()
    {
        $schema = array(
            'name' => $this->_name,
            'label' => $this->_label,
            'description' => $this->_description,
            'type' => $this->_type,
            'store' => $this->_isStored,
            'index' => $this->_isIndexd,
            'multivalue' => $this->_isMultiValued,
        );

        if (isset($this->_size)) {
            $schema['size'] = $this->_size;
        }

        return $schema;
    }
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'],
		);
	}
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;
    }
325301
public function attributes()
    {
        $attributes = [];
        foreach ($this->rules() as $rule) {
            $names = reset($rule);
            if (is_string($names)) {
                $names = [$names];
            }
            foreach ($names as $name) {
                if (substr_compare($name, '!', 0, 1) === 0) {
                    $name = mb_substr($name, 1);
                }
                $attributes[$name] = $name;
            }
        }

        return array_values($attributes);
    }
313843
public function toArray(): array
    {
        return [
            'name' => $this->name,
            'text' => $this->text,
            'type' => $this->type,
            'value' => $this->value,
            'style' => $this->style,
            'confirm' => $this->confirmation,
        ];
    }
716168
public function toArray()
    {
        return [
            'id' => $this->id,
            'modelType' => $this->model_type,
            'modelId' => $this->model_id,
            'name' => $this->name,
            'price' => $this->price,
            'image' => $this->image,
            'quantity' => $this->quantity,
        ];
    }
1201603
public function toArray()
	{
		$attributes = parent::toArray();

		if (isset($attributes['permissions']))
		{
			$attributes['permissions'] = $this->getPermissionsAttribute($attributes['permissions']);
		}

		return $attributes;
	}
1080641
public function toArray()
    {
        $result = $this->getVisibleAttributes();
        $map    = $this->getMap();
        foreach ($map as $from => $to) {
            $result[$to] = $result[$from];
            unset($result[$from]);
        }

        return $result;
    }
1264181
public function toArray()
        {
            return [
                'tag' => $this->tag,
                'void' => $this->void,
                'attributes' => $this->attributes,
                'content' => $this->recursivelyArrayify($this->content)
            ];
        }
1292261
public function attributes()
    {
        $attributes = \yii\base\Model::attributes();
        foreach (self::rules() as $rule) {
            if (is_string(reset($rule))) {
                continue;
            }
            foreach (reset($rule) as $attribute) {
                if (substr_compare($attribute, '!', 0, 1) === 0) {
                    $attribute = mb_substr($attribute, 1);
                }
                $attributes[$attribute] = $attribute;
            }
        }

        return array_values($attributes);
    }