Returns the current attachment state data.

@return AttachmentData
434886
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()
        );
    }
638161
public function getData()
    {
        $data   = [];
        $path   = $this->getPath();
        $dir    = new Folder($path);
        $files  = (array) $dir->find('.*\.php');

        if (count($files) > 0) {
            foreach ($files as $file) {
                $name     = FS::filename($file);
                $segments = explode('_', $name);
                $version  = array_shift($segments);
                $class    = Inflector::camelize(implode('_', $segments));

                $data[$version] = [
                    'class' => $class,
                    'path'  => $path . DS . $file
                ];
            }
        }

        return $data;
    }
1284935
public function attachmentOptions()
    {
        if ($this->attachmentOptions === null) {
            $this->attachmentOptions = $this->defaultAttachmentOptions();
        }

        return $this->attachmentOptions;
    }
39868
public function getData()
    {
        $data = [];

        $problems = $this->fetcher->fetch();

        $allowedSeverities = [
            Problem::SEVERITY_CRITICAL,
            Problem::SEVERITY_WARNING,
        ];

        foreach ($problems as $problem) {
            if (!in_array($problem->getSeverity(), $allowedSeverities)) {
                continue;
            }

            $data[] = [
                'id' => strlen($problem->getId()) ? $problem->getId() : md5(serialize($problem)),
                'iconCls' => $problem->getIconClass(),
                'severity' => $problem->getSeverity(),
                'msg' => $problem->getMessage(),
                'hint' => $problem->getHint(),
                'link' => $problem->getLink(),
            ];
        }

        if (!count($data)) {
            $data = false;
        }

        return $data;
    }
230180
public static function getProperties()
    {
        return [
            'AttachmentID' => [false, self::PROPERTY_TYPE_STRING, null, false, false],
            'FileName' => [true, self::PROPERTY_TYPE_STRING, null, false, false],
            'Url' => [false, self::PROPERTY_TYPE_STRING, null, false, false],
            'MimeType' => [false, self::PROPERTY_TYPE_STRING, null, false, false],
            'ContentLength' => [false, self::PROPERTY_TYPE_INT, null, false, false],
        ];
    }
1220879
public function getData()
    {
        $res = [
            'recipient' =>  [
                'id' => $this->recipient
            ],
            'notification_type'=> $this->notification_type,
            'messaging_type' => $this->messaging_type
        ];

        $attachment = new Attachment(Attachment::TYPE_AUDIO, [], $this->quick_replies);

        if (strcmp(intval($this->text), $this->text) === 0) {
            $attachment->setPayload(array('attachment_id' => $this->text));
        } elseif (strpos($this->text, 'http://') === 0 || strpos($this->text, 'https://') === 0) {
            $attachment->setPayload(array('url' => $this->text));
        } else {
            $attachment->setFileData($this->getCurlValue($this->text, mime_content_type($this->text), basename($this->text)));
        }

        $res['message'] = $attachment->getData();

        return $res;
    }
1138180
public function getAttachment()
    {
        if ($this->relatedObject === null && $this->isRelatedObjectResolved === false) {
            $this->isRelatedObjectResolved = true;

            try {
                $model = $this->modelFactory()->create(Attachment::class)->load($this->attachmentId());
                if ($model->id()) {
                    $this->relatedObject = $model;

                    $type = $model->type();
                    if ($type !== $model->objType()) {
                        $this->relatedObject = $this->modelFactory()->create($type)->setData($model->data());
                    }
                }
            } catch (Exception $e) {
                throw new LogicException(sprintf(
                    'Could not load the related object of the relationship: %s',
                    $e->getMessage()
                ), 0, $e);
            }
        }

        return $this->relatedObject;
    }
442106
public function getData()
    {
        if (!$this->data && $this->getLocation()) {
            $this->data = file_get_contents($this->getLocation());
        }

        return $this->data;
    }
478860
public function getData() {
        $values = array_filter(filter_input_array(INPUT_POST));
        foreach ($values as $key => $value) {
            if ( is_array($value) )  {
                $values[$key] = array_filter($value);
            }
        }

        return $values + $_FILES;
    }
40680
public function current()
    {
        $value = parent::current();
        if (!isset($value['file'])) {
            $value['file'] = $this->collection->createDownload(array_intersect_key($value, ['_id' => true, 'filename' => true, 'length' => true, 'chunkSize' => true]));
        }
        return $value;
    }
1332721
public function getAttachments()
    {
        if ($this->isUserMessage() && isset($this->message->attachments)) {
            return $this->message->attachments;
        }

        return null;
    }
639106
public function getSnapshotData() {
        if($this->isAfterSave() && method_exists($this->getEntity(), 'getOldSnapshotData')) {
            $data = $this->getEntity()->getOldSnapshotData();
        } else { //Legacy
            $data = $this->getEntity()->getSnapshotData();
        }
        if(is_null($data)) {
            $data = [];
        }
        return $data;
    }
534775
public function getStatus()
    {
        if ($this->_getField(self::STORAGE_ID)) {
            return ( $this->_getField(self::$PAYMENT_INFORMATION) ) ? self::STATE_NOT_EMPTY : self::STATE_EXISTING;
        } else {
            return ( $this->_getField(self::$ERRORS) ) ? self::STATE_FAILURE : self::STATE_NOT_EXISTING;
        }
    }
1127325
public function getData()
    {
        if ($this->_paginator == null) {
            $this->_paginator = $this->getPaginate();
        }
        if ($this->_data == null) {
            $this->_data = $this->_paginator->items;
        }

        return $this->_data;
    }
98989
public function getData()
    {
        $result = [
            'title' => $this->title,
            'subtitle' => $this->subtitle,
            'item_url' => $this->url,
            'image_url' => $this->image_url,
        ];
        
        if (!empty($this->default_action)) {
            $result['default_action'] = $this->default_action;
        }

        if (!empty($this->buttons)) {
            $result['buttons'] = [];

            foreach ($this->buttons as $btn) {
                $result['buttons'][] = $btn->getData();
            }
        }

        return $result;
    }
358881
public function getAttachmentUrls()
    {
        return Collection::make($this->event->get('attachments'))->map(function ($item) {
            return new File($item['contentUrl'], $item);
        })->toArray();
    }
875892
public function getData()
    {
        if (empty($this->data)) {
            $this->data = [
                'project' => $this->getComposerData()->name
            ];
            $this->data = array_merge($this->data, $this->getAuthor());
        }
        return $this->data;
    }