MetaFox

AbstractCategoryRepository extends AbstractRepository
in package
implements CategoryRepositoryInterface

AbstractYes

Trait HasApprove.

Tags
codeCoverageIgnore
SuppressWarnings

(PHPMD.UnusedFormalParameter)

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

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|null

cleanTitle()

public cleanTitle(string|null $string) : string|null
Parameters
$string : string|null
Return values
string|null

createCategory()

public createCategory(User $context, array<string|int, mixed> $attributes) : Model
Parameters
$context : User
$attributes : array<string|int, mixed>
Return values
Model

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
bool

decrementTotalItemCategories()

public decrementTotalItemCategories(Model|null $category, int $totalItem) : void
Parameters
$category : Model|null
$totalItem : int
Tags
inheritDoc

deleteOrMoveToNewCategory()

public deleteOrMoveToNewCategory(Model $category, int $newCategoryId) : bool
Parameters
$category : Model
$newCategoryId : int
Return values
bool

getAllCategories()

public getAllCategories(User $context, array<string|int, mixed> $attributes) : Collection
Parameters
$context : User
$attributes : array<string|int, mixed>
Return values
Collection

getCategoriesForStoreForm()

public getCategoriesForStoreForm(Model|null $category) : array<int, mixed>
Parameters
$category : Model|null
Return values
array<int, mixed>

getChildrenIds()

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
bool

incrementTotalItemCategories()

public incrementTotalItemCategories(Model|null $category, int $totalItem) : void
Parameters
$category : Model|null
$totalItem : int
Tags
inheritDoc

isNoSponsorView()

public isNoSponsorView(string|null $view) : bool
Parameters
$view : string|null
Return values
bool

likeOperator()

return the case-insensitive LIKE operator bases on the current database driver.

public likeOperator() : string
Return values
string

migrateCategoryRelationAfterImport()

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
bool

updateCategory()

public updateCategory(User $context, int $id, array<string|int, mixed> $attributes) : Model
Parameters
$context : User
$id : int
$attributes : array<string|int, mixed>
Return values
Model

viewForAdmin()

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
throws
RepositoryException
Return values
$this

withUserMorphTypeActiveScope()

public withUserMorphTypeActiveScope() : self
Return values
self

changeParentCategory()

protected changeParentCategory(Model $category, int $newCategoryId) : void
Parameters
$category : Model
$newCategoryId : int

getCategoryRelation()

protected getCategoryRelation(array<string|int, mixed>|null $categoryIds) : Builder
Parameters
$categoryIds : array<string|int, mixed>|null
Return values
Builder

getDefaultCategoryParentIdsCacheKey()

protected getDefaultCategoryParentIdsCacheKey() : string
Return values
string

getRelation()

protected getRelation(string $table) : array<string|int, mixed>
Parameters
$table : string
Return values
array<string|int, mixed>

        
On this page

Search results