protected function getCurrentAttachmentData()
    {
        $attributes = [
            'file_name'    => $this->originalFilename(),
            'file_size'    => $this->size(),
            'content_type' => $this->contentType(),
            'updated_at'   => $this->updatedAt(),
            'created_at'   => $this->createdAt(),
            'variants'     => $this->variantsAttribute(),
        ];

        $variants = [];

        foreach ($this->variants() as $variant) {

            $variants[ $variant ] = [
                'file_name'    => $this->variantFilename($variant),
                'content_type' => $this->variantContentType($variant),
                'extension'    => $this->variantExtension($variant),
            ];
        }

        return new AttachmentData(
            $this->name,
            $this->getConfig(),
            $attributes,
            $variants,
            $this->getInstanceKey(),
            $this->getInstanceClass()
        );
    }
protected function getCurrentAttachmentData()
    {
        $attributes = [
            'file_name'    => $this->originalFilename(),
            'file_size'    => $this->size(),
            'content_type' => $this->contentType(),
            'updated_at'   => $this->updatedAt(),
            'created_at'   => $this->createdAt(),
            'variants'     => $this->variantsAttribute(),
        ];

        $variants = [];

        foreach ($this->variants() as $variant) {

            $variants[ $variant ] = [
                'file_name'    => $this->variantFilename($variant),
                'content_type' => $this->variantContentType($variant),
                'extension'    => $this->variantExtension($variant),
            ];
        }

        return new AttachmentData(
            $this->name,
            $this->getConfig(),
            $attributes,
            $variants,
            $this->getInstanceKey(),
            $this->getInstanceClass()
        );
    }
protected function getCurrentAttachmentData ( ) { $ attributes = [ 'file_name' => $ this -> originalFilename ( ) , 'file_size' => $ this -> size ( ) , 'content_type' => $ this -> contentType ( ) , 'updated_at' => $ this -> updatedAt ( ) , 'created_at' => $ this -> createdAt ( ) , 'variants' => $ this -> variantsAttribute ( ) , ] ; $ variants = [ ] ; foreach ( $ this -> variants ( ) as $ variant ) { $ variants [ $ variant ] = [ 'file_name' => $ this -> variantFilename ( $ variant ) , 'content_type' => $ this -> variantContentType ( $ variant ) , 'extension' => $ this -> variantExtension ( $ variant ) , ] ; } return new AttachmentData ( $ this -> name , $ this -> getConfig ( ) , $ attributes , $ variants , $ this -> getInstanceKey ( ) , $ this -> getInstanceClass ( ) ) ; }
Returns the current attachment state data.

@return AttachmentData
Returns the current attachment state data .