private function getFileFieldsByDynamic(Dynamic $dynamic)
    {
        $form = $dynamic->getForm();

        $fields = $form->getFieldsByType(Dynamic::TYPE_ATTACHMENT);

        if (0 === count($fields)) {
            return [];
        }

        $collectionId = $this->getCollectionIdByDynamic($dynamic);

        $fileFields = [];
        foreach ($fields as $field) {
            $fileFields[$field->getKey()] = $collectionId;
        }

        return $fileFields;
    }
private function getFileFieldsByDynamic(Dynamic $dynamic)
    {
        $form = $dynamic->getForm();

        $fields = $form->getFieldsByType(Dynamic::TYPE_ATTACHMENT);

        if (0 === count($fields)) {
            return [];
        }

        $collectionId = $this->getCollectionIdByDynamic($dynamic);

        $fileFields = [];
        foreach ($fields as $field) {
            $fileFields[$field->getKey()] = $collectionId;
        }

        return $fileFields;
    }
private function getFileFieldsByDynamic ( Dynamic $ dynamic ) { $ form = $ dynamic -> getForm ( ) ; $ fields = $ form -> getFieldsByType ( Dynamic :: TYPE_ATTACHMENT ) ; if ( 0 === count ( $ fields ) ) { return [ ] ; } $ collectionId = $ this -> getCollectionIdByDynamic ( $ dynamic ) ; $ fileFields = [ ] ; foreach ( $ fields as $ field ) { $ fileFields [ $ field -> getKey ( ) ] = $ collectionId ; } return $ fileFields ; }
Get file fields by dynamic.

@param Dynamic $dynamic

@return int[]
Get file fields by dynamic .