AbstractCategoryRepository
        
        extends AbstractRepository
    
    
            
            in package
            
        
    
            
            implements
                            CategoryRepositoryInterface                    
    
    
AbstractYes
Trait HasApprove.
Tags
Table of Contents
Interfaces
- CategoryRepositoryInterface
 - Interface CategoryRepositoryInterface.
 
Properties
- $disableSponsor : mixed
 - $skipPresenter : mixed
 
Methods
- buildQueryScopes() : mixed
 - cleanContent() : string|null
 - cleanTitle() : string|null
 - clearCache() : mixed
 - createCategory() : Model
 - createCategoryRelation() : void
 - createCategoryRelationFor() : void
 - createMany() : bool
 - createTopLevelCategoryRelation() : void
 - decrementTotalItemCategories() : void
 - deleteCategoryRelations() : void
 - deleteOrMoveToNewCategory() : bool
 - getAllCategories() : Collection
 - getCategoriesForForm() : array<int, mixed>
 - getCategoriesForStoreForm() : array<int, mixed>
 - getCategoryForFilter() : Collection
 - getChildrenIds() : array<string|int, mixed>
 - getParentIds() : array<string|int, mixed>
 - getStructure() : array<string|int, mixed>
 - getUserContractMorphTypeColumns() : array<string|int, string>
 - hasSponsorView() : bool
 - incrementTotalItemCategories() : void
 - isNoSponsorView() : bool
 - likeOperator() : string
 - return the case-insensitive LIKE operator bases on the current database driver.
 - migrateCategoryRelationAfterImport() : void
 - orderCategories() : bool
 - toggleActive() : Model
 - updateCategory() : Model
 - viewForAdmin() : mixed
 - where() : $this
 - withUserMorphTypeActiveScope() : self
 - changeParentCategory() : void
 - getCategoryInactive() : mixed
 - getCategoryRelation() : Builder
 - getDefaultCategoryParentIdsCacheKey() : string
 - getNextOrdering() : int
 - getRelation() : array<string|int, mixed>
 - getStructureCacheKey() : string
 - getViewAllCacheId() : string
 - getViewInactiveCacheId() : string
 - getViewLevelCacheId() : string
 
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|nullclearCache()
    public
                    clearCache() : mixed
    createCategory()
    public
                    createCategory(User $context, array<string|int, mixed> $attributes) : Model
    Parameters
- $context : User
 - $attributes : array<string|int, mixed>
 
Return values
ModelcreateCategoryRelation()
    public
                    createCategoryRelation() : void
    createCategoryRelationFor()
    public
                    createCategoryRelationFor(Model $category) : void
    Parameters
- $category : Model
 
createMany()
    public
                    createMany(array<string|int, mixed> $items) : bool
    Parameters
- $items : array<string|int, mixed>
 
Return values
boolcreateTopLevelCategoryRelation()
    public
                    createTopLevelCategoryRelation() : void
    Tags
decrementTotalItemCategories()
    public
                    decrementTotalItemCategories(Model|null $category, int $totalItem) : void
    Parameters
- $category : Model|null
 - $totalItem : int
 
Tags
deleteCategoryRelations()
    public
                    deleteCategoryRelations(Model $category) : void
    Parameters
- $category : Model
 
deleteOrMoveToNewCategory()
    public
                    deleteOrMoveToNewCategory(Model $category, int $newCategoryId) : bool
    Parameters
- $category : Model
 - $newCategoryId : int
 
Return values
boolgetAllCategories()
    public
                    getAllCategories(User $context, array<string|int, mixed> $attributes) : Collection
    Parameters
- $context : User
 - $attributes : array<string|int, mixed>
 
Return values
CollectiongetCategoriesForForm()
    public
                    getCategoriesForForm() : array<int, mixed>
    Return values
array<int, mixed>getCategoriesForStoreForm()
    public
                    getCategoriesForStoreForm(Model|null $category) : array<int, mixed>
    Parameters
- $category : Model|null
 
Return values
array<int, mixed>getCategoryForFilter()
    public
                    getCategoryForFilter() : Collection
    Return values
CollectiongetChildrenIds()
    public
                    getChildrenIds(int $categoryId) : array<string|int, mixed>
    Parameters
- $categoryId : int
 
Return values
array<string|int, mixed>getParentIds()
    public
                    getParentIds(int $categoryId) : array<string|int, mixed>
    Parameters
- $categoryId : int
 
Return values
array<string|int, mixed>getStructure()
    public
                    getStructure(User $context, array<string|int, mixed> $attributes) : array<string|int, mixed>
    Parameters
- $context : User
 - $attributes : array<string|int, mixed>
 
Return values
array<string|int, mixed>getUserContractMorphTypeColumns()
    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
boolincrementTotalItemCategories()
    public
                    incrementTotalItemCategories(Model|null $category, int $totalItem) : void
    Parameters
- $category : Model|null
 - $totalItem : int
 
Tags
isNoSponsorView()
    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
stringmigrateCategoryRelationAfterImport()
    public
                    migrateCategoryRelationAfterImport(string $tableName) : void
    Parameters
- $tableName : string
 
orderCategories()
    public
                    orderCategories(array<string|int, mixed> $orderIds) : bool
    Parameters
- $orderIds : array<string|int, mixed>
 
Return values
booltoggleActive()
    public
                    toggleActive(int $id) : Model
    Parameters
- $id : int
 
Return values
ModelupdateCategory()
    public
                    updateCategory(User $context, int $id, array<string|int, mixed> $attributes) : Model
    Parameters
- $context : User
 - $id : int
 - $attributes : array<string|int, mixed>
 
Return values
ModelviewForAdmin()
    public
                    viewForAdmin(User $context, array<string|int, mixed> $attributes) : mixed
    Parameters
- $context : User
 - $attributes : array<string|int, mixed>
 
where()
    public
                    where(array<string|int, mixed> $params) : $this
    Parameters
- $params : array<string|int, mixed>
 
Tags
Return values
$thiswithUserMorphTypeActiveScope()
    public
                    withUserMorphTypeActiveScope() : self
    Return values
selfchangeParentCategory()
    protected
                    changeParentCategory(Model $category, int $newCategoryId) : void
    Parameters
- $category : Model
 - $newCategoryId : int
 
getCategoryInactive()
    protected
                    getCategoryInactive() : mixed
    getCategoryRelation()
    protected
                    getCategoryRelation(array<string|int, mixed>|null $categoryIds) : Builder
    Parameters
- $categoryIds : array<string|int, mixed>|null
 
Return values
BuildergetDefaultCategoryParentIdsCacheKey()
    protected
                    getDefaultCategoryParentIdsCacheKey() : string
    Return values
stringgetNextOrdering()
    protected
                    getNextOrdering(int $level) : int
    Parameters
- $level : int
 
Return values
intgetRelation()
    protected
                    getRelation(string $table) : array<string|int, mixed>
    Parameters
- $table : string
 
Return values
array<string|int, mixed>getStructureCacheKey()
    protected
                    getStructureCacheKey() : string
    Return values
stringgetViewAllCacheId()
    protected
                    getViewAllCacheId() : string
    Return values
stringgetViewInactiveCacheId()
    protected
                    getViewInactiveCacheId() : string
    Return values
stringgetViewLevelCacheId()
    protected
                    getViewLevelCacheId() : string