class CategoryItemRepository

Class CategoryItemRepository

Traits

Properties

static protected array $models model class name from EloquentRepositoryTrait
protected Dispatcher $dispatcher Event dispatcher instance
static protected callable $provider Category model class provider

Methods

Model
update(Model $item, array $data = array())

update

bool|null
delete(CategoryItem $item)

Delete a category item

int
increment(Model $item, string $column, int $amount = 1)

Increment a column's value by a given amount.

int
decrement(Model $item, string $column, int $amount = 1)

Decrement a column's value by a given amount.

static string
getModel()

The name of Category model class

static void
setModel(string $model)

Set the name of Category model

Model
createModel()

Create model instance

Builder
query()

query

mixed
__call(string $name, array $arguments)

__call

__construct(Dispatcher $dispatcher)

CategoryItemRepository constructor.

create(array $attributes = array())

Create category item

void
exclude(CategoryItem $item, CategoryItem $excluded)

Exclude object from ancestors of item

static void
setAggregator(string $aggregator)

Set aggregator to model

static void
setCategoryModelProvider(callable $provider)

Set category model class provider

static string
provideCategoryModel()

Provide category model class

Details

Model update(Model $item, array $data = array())

update

Parameters

Model $item item
array $data data

Return Value

Model

at line 82
bool|null delete(CategoryItem $item)

Delete a category item

Parameters

CategoryItem $item category item

Return Value

bool|null

int increment(Model $item, string $column, int $amount = 1)

Increment a column's value by a given amount.

Parameters

Model $item item
string $column column
int $amount amount

Return Value

int

int decrement(Model $item, string $column, int $amount = 1)

Decrement a column's value by a given amount.

Parameters

Model $item item
string $column column
int $amount amount

Return Value

int

at line 118
static string getModel()

The name of Category model class

Return Value

string

at line 131
static void setModel(string $model)

Set the name of Category model

Parameters

string $model model class

Return Value

void

Model createModel()

Create model instance

Return Value

Model

Builder query()

query

Return Value

Builder

mixed __call(string $name, array $arguments)

__call

Parameters

string $name method name
array $arguments arguments

Return Value

mixed

at line 56
__construct(Dispatcher $dispatcher)

CategoryItemRepository constructor.

Parameters

Dispatcher $dispatcher Event dispatcher instance

at line 67
CategoryItem create(array $attributes = array())

Create category item

Parameters

array $attributes attributes

Return Value

CategoryItem

at line 100
void exclude(CategoryItem $item, CategoryItem $excluded)

Exclude object from ancestors of item

Parameters

CategoryItem $item category item
CategoryItem $excluded to be excluded category item

Return Value

void

at line 145
static protected void setAggregator(string $aggregator)

Set aggregator to model

Parameters

string $aggregator aggregator class

Return Value

void

at line 157
static void setCategoryModelProvider(callable $provider)

Set category model class provider

Parameters

callable $provider callable

Return Value

void

at line 167
static string provideCategoryModel()

Provide category model class

Return Value

string