class MenuItem extends CategoryItem

Class MenuItem

Traits

Constants

CREATED_AT

column nam of created at

UPDATED_AT

column nam of updated at

DELETED_AT

column nam of deleted at

Properties

static protected Keygen $keyGenerator from DynamicModel
static protected ConnectionResolverInterface $resolver The connection resolver instance. from DynamicModel
static protected array $macros The registered macros. from DynamicModel
protected array $proxyOptions from DynamicModel
protected bool $dynamic from DynamicModel
protected array $dynamicAttributes dynamic mode 애서 사용될 attributes from DynamicModel
protected NodeInterface $parent from Node
protected Collection $children children collection of model from Node
Collection $ancestors Collection$ancestors from Node
Collection $descendants Collection$descendants from Node
protected string $table The table associated with the model.
bool $timestamps Indicates if the model should be timestamped.
protected string $closureTable The hierarchy table associated with the model.
protected array $fillable The attributes that are mass assignable.
static protected string $aggregator todo: see CategoryItem class
static protected Closure $linkResolver
bool $incrementing Indicates if the IDs are auto-incrementing.
protected bool $selected Indicates if the model selected.
protected array $casts The attributes that should be cast to native types.
string $id string$id자동 생성된 고유한 식별자
string $menuId string$menuId소속된 MenuEntity 의 ID
string $parentId string$parentId부모의 ID
string $url string$url해당 메뉴의 URL
string $preTitle string$preTitleUI 에서 출력을 위해서 사용되는 property title 출력전에 추가
string $title string$title사용자에게 보여지는 이름
string $postTitle string$postTitleUI 에서 출력을 위해서 사용되는 property title 출력후에 추가
string $description string$description설명
string $target string$target링크의 클릭시 옵션
bool $activated bool$activated활성/비활성 유무
string $type string$type해당 메뉴의 type
int $ordering int$ordering정렬을 위한 순서
Menu $menu Menu$menu객체가 속한 메뉴

Methods

array
filter(array $args, array $columns = array())

$args 로 넘어온 데이터와 $columns 를 비교해서 $args 값을 거른다.

array
schema()

get table schema

void
fill(array $attributes)

fill

getKeyGen()

get key generator

static void
setKeyGen(Keygen $keyGenerator)

Set key generator

static Connection
resolveConnection(string|null $connection = null)

Resolve a connection instance.

static ConnectionResolverInterface
getConnectionResolver()

Get the connection resolver instance.

static void
setConnectionResolver(ConnectionResolverInterface $resolver)

Set the connection resolver instance.

static void
unsetConnectionResolver()

Unset the connection resolver for models.

$this
setDynamic(bool $use)

dynamic query 사용하도록 설정

$this
setProxyOptions(array $options)

proxy option 설정

array
getProxyOptions()

get proxy option

array
getDynamicAttributes()

get dynamic attributes

newEloquentBuilder(DynamicQuery $query)

Create a new Eloquent query builder for the model.

newBaseQueryBuilder()

Illuminate Model 의 newBaseQueryBuilder 변경 VirtualConnection 을 통해 DynamicQuery 를 사용하도록 처리

bool
performInsert(Builder $query, array $options = array())

No description

bool
save(array $options = array())

Save the model to the database.

static void
macro(string $name, callable $macro)

Register a custom macro.

static bool
hasMacro(string $name)

Checks if macro is registered.

mixed
callMacro(string $name, array $parameters = array())

call macro

mixed
getMacroValue(string $name)

get macro value

mixed
__call(string $method, array $parameters)

Handle dynamic method calls into the model.

mixed
__get(string $key)

Dynamically retrieve attributes on the model.

makeTree(array $nodes = array())

Make Tree instance

BelongsTo
aggregator()

Aggregator relationship

from Node
BelongsToMany
ancestors(bool $without = true)

Ancestors relationship

from Node
BelongsToMany
descendants(bool $without = true)

Descendants relationship

from Node
string|int
getNodeIdentifier()

Get the unique identifier for the node

from Node
string
getNodeIdentifierName()

Get the unique identifier name for the node

from Node
string|int
getParentNodeIdentifier()

Get the parent identifier for the node

from Node
getParent()

Return the parent node or null

from Node
void
setParent(NodeInterface $node)

Set parent node

from Node
Collection
getChildren()

Return the child node items or empty array

void
setChildren(NodeInterface[] $children = array())

Set child nodes

from Node
void
addChild(NodeInterface $node)

Add child node

from Node
bool
hasChild()

Check having child and return the boolean result.

from Node
Collection
children()

Returns children collection

from Node
getDescendantTree(bool $withSelf = false)

Get a descendant tree collection of model

from Node
int
getDescendantCount()

Returns a number of descendants

from Node
int
getDepth()

Get the depth value of model

from Node
Collection
getBreadcrumbs()

get breadcrumbs

from Node
Builder
scopeRoots(Builder $query)

Scope for get node items of root

from Node
Builder
scopeProgenitors(Builder $query, Aggregator $aggregator)

Scope for get node items of progenitor

from Node
string
getClosureTable()

Get the pivot table for model's hierarchy

string
getAncestorName()

Get the ancestor key name of pivot table

string
getDescendantName()

Get the descendant key name of pivot table

string
getDepthName()

Get the depth key name of pivot table

string
getParentIdName()

Get the parent key name for model

string
getAggregatorModel()

Get the aggregator model name for model

string
getAggregatorKeyName()

Get the aggregator key name for model

BelongsTo
category()

Alias aggregator

string
getOrderKeyName()

Get the order key name for model

static void
setAggregatorModel(string $model)

Set the aggregator model name for model

BelongsTo
menu()

Alias aggregator

HasOne
route()

Instance route relationship

BelongsTo
basicImage()

Basic link image relationship

BelongsTo
hoverImage()

Hover link image relationship

BelongsTo
selectedImage()

Selected link image relationship

Image|null
getHoverImage()

Get hover link image of model

Image|null
getSelectedImage()

Get selected link image of model

BelongsTo
mBasicImage()

Mobile basic link image relationship

BelongsTo
mHoverImage()

Mobile hover link image relationship

BelongsTo
mSelectedImage()

Mobile selected link image relationship

Image|null
getMBasicImage()

Get mobile basic link image of model

Image|null
getMHoverImage()

Get mobile hover link image of model

Image|null
getMSelectedImage()

Get mobile selected link image of model

void
setSelected(bool $bool = true)

Set model selected

bool
isSelected()

Determine if model is selected

array
toArray()

Convert the model instance to an array.

static void
setLinkResolver(Closure $callback)

Set the link resolver callback

string
getLinkAttribute()

Get link attribute

Details

in DynamicModel at line 103
array filter(array $args, array $columns = array())

$args 로 넘어온 데이터와 $columns 를 비교해서 $args 값을 거른다.

처리중인 $columns 와 같은 이름을 데이터만 리턴됨 이 처리는 dynamic 을 통해 proxy 를 처리 할 경우에 대해서 동작됨

Parameters

array $args insert, update data
array $columns table columns

Return Value

array

in DynamicModel at line 124
private array schema()

get table schema

Return Value

array

in DynamicModel at line 135
void fill(array $attributes)

fill

Parameters

array $attributes attributes

Return Value

void

in DynamicModel at line 150
Keygen getKeyGen()

get key generator

Return Value

Keygen

in DynamicModel at line 164
static void setKeyGen(Keygen $keyGenerator)

Set key generator

Parameters

Keygen $keyGenerator key generator

Return Value

void

in DynamicModel at line 175
static Connection resolveConnection(string|null $connection = null)

Resolve a connection instance.

Parameters

string|null $connection connection name

Return Value

Connection

in DynamicModel at line 185
static ConnectionResolverInterface getConnectionResolver()

Get the connection resolver instance.

Return Value

ConnectionResolverInterface

in DynamicModel at line 196
static void setConnectionResolver(ConnectionResolverInterface $resolver)

Set the connection resolver instance.

Parameters

ConnectionResolverInterface $resolver resolver

Return Value

void

in DynamicModel at line 206
static void unsetConnectionResolver()

Unset the connection resolver for models.

Return Value

void

in DynamicModel at line 217
$this setDynamic(bool $use)

dynamic query 사용하도록 설정

Parameters

bool $use use dynamic query

Return Value

$this

in DynamicModel at line 228
$this setProxyOptions(array $options)

proxy option 설정

Parameters

array $options proxy options

Return Value

$this

in DynamicModel at line 239
array getProxyOptions()

get proxy option

Return Value

array

in DynamicModel at line 249
array getDynamicAttributes()

get dynamic attributes

Return Value

array

in DynamicModel at line 261
Builder|DynamicModel newEloquentBuilder(DynamicQuery $query)

Create a new Eloquent query builder for the model.

Xpressengine\Database\Eloquent\Builder 울 사용하도록 변경

Parameters

DynamicQuery $query dynamic query builder

Return Value

Builder|DynamicModel

in DynamicModel at line 272
protected DynamicQuery newBaseQueryBuilder()

Illuminate Model 의 newBaseQueryBuilder 변경 VirtualConnection 을 통해 DynamicQuery 를 사용하도록 처리

Return Value

DynamicQuery

in DynamicModel at line 291
protected bool performInsert(Builder $query, array $options = array())

Parameters

Builder $query Illuminate database eloquent buildere
array $options options

Return Value

bool

in DynamicModel at line 305
bool save(array $options = array())

Save the model to the database.

Parameters

array $options options

Return Value

bool

in DynamicModel at line 321
static void macro(string $name, callable $macro)

Register a custom macro.

Parameters

string $name macro name
callable $macro callable

Return Value

void

in DynamicModel at line 332
static bool hasMacro(string $name)

Checks if macro is registered.

Parameters

string $name macro name

Return Value

bool

in DynamicModel at line 343
mixed callMacro(string $name, array $parameters = array())

call macro

Parameters

string $name macro name
array $parameters parameters

Return Value

mixed

in DynamicModel at line 359
mixed getMacroValue(string $name)

get macro value

Parameters

string $name macro name

Return Value

mixed

in DynamicModel at line 376
mixed __call(string $method, array $parameters)

Handle dynamic method calls into the model.

Parameters

string $method method
array $parameters parameters

Return Value

mixed

in DynamicModel at line 391
mixed __get(string $key)

Dynamically retrieve attributes on the model.

Parameters

string $key key

Return Value

mixed

in TreeMakerTrait at line 31
protected Tree makeTree(array $nodes = array())

Make Tree instance

Parameters

array $nodes node items

Return Value

Tree

in Node at line 56
BelongsTo aggregator()

Aggregator relationship

Return Value

BelongsTo

in Node at line 67
BelongsToMany ancestors(bool $without = true)

Ancestors relationship

Parameters

bool $without without self node when value is true

Return Value

BelongsToMany

in Node at line 90
BelongsToMany descendants(bool $without = true)

Descendants relationship

Parameters

bool $without without self node when value is true

Return Value

BelongsToMany

in Node at line 111
string|int getNodeIdentifier()

Get the unique identifier for the node

Return Value

string|int

in Node at line 121
string getNodeIdentifierName()

Get the unique identifier name for the node

Return Value

string

in Node at line 131
string|int getParentNodeIdentifier()

Get the parent identifier for the node

Return Value

string|int

in Node at line 141
Node|Node getParent()

Return the parent node or null

Return Value

Node|Node

in Node at line 158
void setParent(NodeInterface $node)

Set parent node

Parameters

NodeInterface $node parent node

Return Value

void

at line 270
Collection getChildren()

Return the child node items or empty array

Return Value

Collection

in Node at line 183
void setChildren(NodeInterface[] $children = array())

Set child nodes

Parameters

NodeInterface[] $children children node interfaces

Return Value

void

in Node at line 194
void addChild(NodeInterface $node)

Add child node

Parameters

NodeInterface $node child node

Return Value

void

in Node at line 204
bool hasChild()

Check having child and return the boolean result.

Return Value

bool

in Node at line 214
protected Collection children()

Returns children collection

Return Value

Collection

in Node at line 229
Tree getDescendantTree(bool $withSelf = false)

Get a descendant tree collection of model

Parameters

bool $withSelf flag for descendant tree with self

Return Value

Tree

in Node at line 244
int getDescendantCount()

Returns a number of descendants

Return Value

int

in Node at line 261
int getDepth()

Get the depth value of model

Return Value

int

in Node at line 271
Collection getBreadcrumbs()

get breadcrumbs

Return Value

Collection

in Node at line 295
Builder scopeRoots(Builder $query)

Scope for get node items of root

Parameters

Builder $query query builder

Return Value

Builder

in Node at line 307
Builder scopeProgenitors(Builder $query, Aggregator $aggregator)

Scope for get node items of progenitor

Parameters

Builder $query query builder
Aggregator $aggregator category instance

Return Value

Builder

in CategoryItem at line 109
string getClosureTable()

Get the pivot table for model's hierarchy

Return Value

string

in CategoryItem at line 119
string getAncestorName()

Get the ancestor key name of pivot table

Return Value

string

in CategoryItem at line 129
string getDescendantName()

Get the descendant key name of pivot table

Return Value

string

in CategoryItem at line 139
string getDepthName()

Get the depth key name of pivot table

Return Value

string

in CategoryItem at line 149
string getParentIdName()

Get the parent key name for model

Return Value

string

in CategoryItem at line 169
string getAggregatorModel()

Get the aggregator model name for model

Return Value

string

at line 283
string getAggregatorKeyName()

Get the aggregator key name for model

Return Value

string

in CategoryItem at line 74
BelongsTo category()

Alias aggregator

Return Value

BelongsTo

in CategoryItem at line 159
string getOrderKeyName()

Get the order key name for model

Return Value

string

in CategoryItem at line 190
static void setAggregatorModel(string $model)

Set the aggregator model name for model

Parameters

string $model model name

Return Value

void

at line 120
BelongsTo menu()

Alias aggregator

Return Value

BelongsTo

at line 130
HasOne route()

Instance route relationship

Return Value

HasOne

at line 140
BelongsTo basicImage()

Basic link image relationship

Return Value

BelongsTo

at line 150
BelongsTo hoverImage()

Hover link image relationship

Return Value

BelongsTo

at line 160
BelongsTo selectedImage()

Selected link image relationship

Return Value

BelongsTo

at line 170
Image|null getHoverImage()

Get hover link image of model

Return Value

Image|null

at line 184
Image|null getSelectedImage()

Get selected link image of model

Return Value

Image|null

at line 198
BelongsTo mBasicImage()

Mobile basic link image relationship

Return Value

BelongsTo

at line 208
BelongsTo mHoverImage()

Mobile hover link image relationship

Return Value

BelongsTo

at line 218
BelongsTo mSelectedImage()

Mobile selected link image relationship

Return Value

BelongsTo

at line 228
Image|null getMBasicImage()

Get mobile basic link image of model

Return Value

Image|null

at line 242
Image|null getMHoverImage()

Get mobile hover link image of model

Return Value

Image|null

at line 256
Image|null getMSelectedImage()

Get mobile selected link image of model

Return Value

Image|null

at line 294
void setSelected(bool $bool = true)

Set model selected

Parameters

bool $bool boolean value

Return Value

void

at line 308
bool isSelected()

Determine if model is selected

Return Value

bool

at line 318
array toArray()

Convert the model instance to an array.

Return Value

array

at line 331
static void setLinkResolver(Closure $callback)

Set the link resolver callback

Parameters

Closure $callback resolver callback

Return Value

void

at line 341
string getLinkAttribute()

Get link attribute

Return Value

string