AttachmentRepository
        
        extends AbstractRepository
    
    
            
            in package
            
        
    
            
            implements
                            AttachmentRepositoryInterface                    
    
    
Class AbstractRepository.
Table of Contents
Interfaces
- AttachmentRepositoryInterface
 - Interface Attachment.
 
Properties
- $disableSponsor : mixed
 - $skipPresenter : mixed
 
Methods
- buildQueryScopes() : mixed
 - cleanContent() : string|null
 - cleanTitle() : string|null
 - createMany() : bool
 - find() : Attachment
 - getModel() : Attachment
 - getUserContractMorphTypeColumns() : array<string|int, string>
 - hasSponsorView() : bool
 - isNoSponsorView() : bool
 - likeOperator() : string
 - return the case-insensitive LIKE operator bases on the current database driver.
 - model() : string
 - updateItemId() : bool
 - <pre>.
 - verifyAttachmentType() : bool
 - where() : $this
 - withUserMorphTypeActiveScope() : self
 - deleteAttachments() : bool
 - updateTotalAttachment() : void
 
Properties
$disableSponsor
    protected
        mixed
    $disableSponsor
    
    
    
    
$skipPresenter
    protected
        mixed
    $skipPresenter
     = true
    
    
    
Methods
buildQueryScopes()
    public
                    buildQueryScopes(mixed $query, mixed $model, mixed $criteria) : mixed
    Parameters
- $query : mixed
 - $model : mixed
 - $criteria : mixed
 
cleanContent()
    public
                    cleanContent(string|null $string) : string|null
    Parameters
- $string : string|null
 
Return values
string|nullcleanTitle()
    public
                    cleanTitle(string|null $string) : string|null
    Parameters
- $string : string|null
 
Return values
string|nullcreateMany()
    public
                    createMany(array<string|int, mixed> $items) : bool
    Parameters
- $items : array<string|int, mixed>
 
Return values
boolfind()
    public
                    find(mixed $id, mixed $columns) : Attachment
    ()
Parameters
- $id : mixed
 - $columns : mixed
 
Return values
AttachmentgetModel()
    public
                    getModel() : Attachment
    Return values
AttachmentgetUserContractMorphTypeColumns()
    public
                    getUserContractMorphTypeColumns() : array<string|int, string>
    Return values
array<string|int, string>hasSponsorView()
    public
                    hasSponsorView(array<string|int, mixed> $attributes) : bool
    Parameters
- $attributes : array<string|int, mixed>
 
Return values
boolisNoSponsorView()
    public
                    isNoSponsorView(string|null $view) : bool
    Parameters
- $view : string|null
 
Return values
boollikeOperator()
return the case-insensitive LIKE operator bases on the current database driver.
    public
                    likeOperator() : string
    Return values
stringmodel()
    public
                    model() : string
    Return values
stringupdateItemId()
<pre>.
    public
                    updateItemId(array<string|int, mixed>|null $attachments, HasTotalAttachment $item) : bool
    Attachments array must contain attachment id and "status"
status = "remove" : remove attachment from item status = "create" : insert new attachment to item
Parameters
- $attachments : array<string|int, mixed>|null
 - $item : HasTotalAttachment
 
Return values
boolverifyAttachmentType()
    public
                    verifyAttachmentType(User $context, UploadedFile $file, string $itemType) : bool
    Parameters
- $context : User
 - $file : UploadedFile
 - $itemType : string
 
Tags
Return values
boolwhere()
    public
                    where(array<string|int, mixed> $params) : $this
    Parameters
- $params : array<string|int, mixed>
 
Tags
Return values
$thiswithUserMorphTypeActiveScope()
    public
                    withUserMorphTypeActiveScope() : self
    Return values
selfdeleteAttachments()
    private
                    deleteAttachments(array<string|int, int> $ids) : bool
    Parameters
- $ids : array<string|int, int>
 
Return values
boolupdateTotalAttachment()
    private
                    updateTotalAttachment(HasTotalAttachment $item) : void
    Parameters
- $item : HasTotalAttachment