Allows customization through an 'updateAttributes' hook on the base class.
Existing attributes are passed in as the first argument and can be manipulated,
but any attributes added through a subclass implementation won't be included.

@return array
515309
public function getAttributes()
    {
        $attributes = array(
            'type' => $this->getInputType(),
            'name' => $this->getName(),
            'value' => $this->Value(),
            'class' => $this->extraClass(),
            'id' => $this->ID(),
            'disabled' => $this->isDisabled(),
            'readonly' => $this->isReadonly(),
            'autofocus' => $this->isAutofocus()
        );

        if ($this->Required()) {
            $attributes['required'] = 'required';
            $attributes['aria-required'] = 'true';
        }

        $attributes = array_merge($attributes, $this->attributes);

        $this->extend('updateAttributes', $attributes);

        return $attributes;
    }
883528
public function getAttributes()
    {
        $attribs = [];
        foreach (array_keys($this->attributeSetters) as $setter) {
            $attribs[] = $this->getPropertyName($setter, "set");
        }

        return $attribs;
    }
172940
public function dotAttributeNames()
    {
        return array_merge(
            array_values(parent::fields()),
            array_keys(static::dotKeyValues(static::dynamicColumn(), $this->_dynamicAttributes))
        );
    }
1102857
protected function getDeletedEventAttributes(): array
    {
        $old = [];

        foreach ($this->attributes as $attribute => $value) {
            if ($this->isAttributeAuditable($attribute)) {
                $old[$attribute] = $value;
            }
        }

        return [
            $old,
            [],
        ];
    }
880679
public function getAttributes()
    {
        if ($this->_oAttributeList === null) {
            $this->_oAttributeList = $this->newAttributelist();
            $this->_oAttributeList->loadAttributes($this->getId(), $this->getParentId());
        }

        return $this->_oAttributeList;
    }
1321048
protected function getAttributes()
    {
        $attributes = [];
        $this->moveToFirstAttribute();

        do {
            $attributes[$this->name] = $this->value;
        } while ($this->moveToNextAttribute());

        return $attributes;
    }
565512
public function getAttributes()
    {
        return [
            Attributes\IdAttribute::make(),
            Attributes\TextAttribute::make('name')
                ->setRequired(true)
                ->setUnique(true),
            Attributes\LongTextAttribute::make('description'),
            Attributes\LongTextAttribute::make('notes'),
            Attributes\BooleanAttribute::make('enabled'),
            Attributes\BelongsToAttribute::make('parent_id')
                ->setRelationName('parent')
                ->setRelationManager(CategoryManager::class),
            Attributes\CreatedAtAttribute::make(),
            Attributes\UpdatedAtAttribute::make(),
            Attributes\DeletedAtAttribute::make(),
        ];
    }
805562
public function getDirtyEncodableAttributes()
    {
        if (empty($this->encodable_attributes)) {
            return [];
        }

        return array_filter($this->encodable_attributes, function ($attribute) {

            // The file has changed
            if ($this->isDirty($attribute)) {
                return true;
            }

            // The encoding preset is changing
            return $this->hasDirtyPreset($attribute);
        });
    }
121702
public function getAttributes()
    {
        // Quick, ugly hack to handle 5.6.37 update (getAttributes() now also called in performInsert()).
        if ($this->isPerformInsertInBacktrace()) {
            return parent::getAttributes();
        }

        return array_merge($this->attachedFiles, parent::getAttributes());
    }
87930
public function build_attributes() {
		// setup attributes.
		$this->set_attributes();

		$attributes = [];
		foreach ( $this->attributes as $att => $value ) {
			if ( is_array( $value ) ) {
				$value = implode( ' ', $value );
			}
			$attributes[] = sprintf( '%s="%s"', esc_html( $att ), esc_attr( $value ) );
		}

		return implode( ' ', $attributes );
	}
1358085
public function setDefaultValuesForAttributes()
    {
        // Only works on new models.
        if ($this->exists) {
            return $this;
        }

        // Defaults on attributes.
        $defaults = $this->getAttributesFromSchema('default', true);

        // Remove attributes that have been given values.
        $defaults = array_except($defaults, array_keys($this->getDirty()));

        // Unguard.
        static::unguard();

        // Allocate values.
        foreach ($defaults as $key => $value) {
            $this->{$key} = $value;
        }

        // Reguard.
        static::reguard();

        return $this;
    }
395547
public function getAttributes():array
    {
        $attributes = $this->attributes;
        if ($this->cssClasses) {
            $attributes['class'] = implode(' ', array_keys($this->cssClasses));
        }
        if ($this->styles) {
            $attributes['style'] = implode(';', $this->styles);
        }
        return $attributes;
    }
315561
public function getAttributes()
    {
        return [
            Attributes\IdAttribute::make(),
            Attributes\TextAttribute::make('name')
                ->setDefault(function ($entity, $attribute) {
                    return Uuid::uuid4()->toString();
                })
                ->setRequired(true),
            Attributes\TextAttribute::make('path')
                ->setFillable(false),
            Attributes\TextAttribute::make('token')->setDefault(function ($entity, $attribute) {
                return $attribute->getManager()->getRepository()->generateToken();
            })->setFillable(false),
            Attributes\EnumAttribute::make('model_type', app('amethyst')->getMorphListable('file', 'model')),
            Attributes\MorphToAttribute::make('model_id')
                ->setRelationKey('model_type')
                ->setRelationName('model')
                ->setRelations(app('amethyst')->getMorphRelationable('file', 'model')),
            Attributes\CreatedAtAttribute::make(),
            Attributes\UpdatedAtAttribute::make(),
        ];
    }
1320036
public function getReferencedAttributes()
    {
        $objAttribute = null;
        if (!($this->get('attr_id')
            && ($objAttribute = $this->getMetaModel()->getAttributeById($this->get('attr_id'))))) {
            return [];
        }

        return $objAttribute ? [$objAttribute->getColName()] : [];
    }
143213
public function getAttributes()
    {
        if ($this->_attributes === null) {
            $this->_attributes = $this->defaultAttributes();
        }
        return $this->_attributes;
    }
119564
protected function defineAttributes()
    {
        $attributes = array(
                'id' => AttributeType::Number,
                'providerHandle' => AttributeType::String,
                'pluginHandle' => AttributeType::String,
                'accessToken' => AttributeType::String,
                'secret' => AttributeType::String,
                'endOfLife' => AttributeType::String,
                'refreshToken' => AttributeType::String,
            );

        return $attributes;
    }
246198
public function getAttributes()
    {
        $attributes = array(
            'id' => $this->ID(),
            'class' => $this->extraClass(),
        );

        if ($this->getStartClosed()) {
            $attributes['class'] .= ' ss-toggle ss-toggle-start-closed';
        } else {
            $attributes['class'] .= ' ss-toggle';
        }

        return array_merge(
            $this->attributes,
            $attributes
        );
    }