SettingsMenu
class SettingsMenu extends Entity implements NodeInterface, JsonSerializable
관리메뉴를 표현하는 클래스
Properties
protected array | $original | The entity attribute's original state. | from Entity |
$hidden | The attributes that should be hidden for arrays. | from Entity | |
protected array | $fillable | The attributes that are mass assignable. | from Entity |
protected array | $guarded | The attributes that aren't mass assignable. | from Entity |
bool | $exists | Indicates if the entity exists. | from Entity |
protected null|SettingsMenu | $parent | ||
protected SettingsMenu[] | $childItems | ||
protected bool | $selected | ||
protected int | $depth | ||
protected array | $breadCrumbs | ||
protected boolean | $hasVisibleChild | ||
Route | $route |
Methods
Constructor
Get the entity's original attribute values.
메뉴의 링크를 생성하여 반환한다. 메뉴에 link정보가 있을 경우 link정보를 우선 사용하여 생성한다.
메뉴의 자식 메뉴중 visible 상태인 메뉴가 있는지 조회한다.
선택된 메뉴의 BreadCrumb을 반환한다.
tree구조를 생성하기 위해 관리메뉴의 부모메뉴 아이디를 찾아서 지정한다.
Get the unique identifier for the node
Get the unique identifier name for the node
Get the parent identifier for the node
Return the parent node or null
Check having child and return the boolean result.
Return the child node items or empty array
Get the order key name for model
setIsSelected
isSelected
(PHP 5 >= 5.4.0)
Specify data which should be serialized to JSON
Details
at line 73
__construct(array $attributes = array())
Constructor
in Entity at line 84
$this
syncOriginal()
Sync the original attributes with the current.
in Entity at line 98
array
getOriginal(string|null $key = null, mixed $default = null)
Get the entity's original attribute values.
in Entity at line 109
$this
fill(array $attributes)
Fill the model with an array of attributes.
in Entity at line 126
bool
isFillable(string $key)
Determine if the given attribute may be mass assigned.
in Entity at line 145
bool
isGuarded(string $key)
Determine if the given key is guarded.
in Entity at line 155
array
getDirty()
Get the attributes that have been changed since last sync.
in Entity at line 165
array
toArray()
Convert the entity instance to an array.
at line 86
Route|mixed|string
link()
메뉴의 링크를 생성하여 반환한다. 메뉴에 link정보가 있을 경우 link정보를 우선 사용하여 생성한다.
그 다음으로 메뉴에 연결된 route정보를 사용하여 링크를 생성한다.
at line 122
bool
hasVisibleChild()
메뉴의 자식 메뉴중 visible 상태인 메뉴가 있는지 조회한다.
at line 147
SettingsMenu[]
getBreadCrumbs()
선택된 메뉴의 BreadCrumb을 반환한다.
at line 166
private void
resolveParentId(array $attributes)
tree구조를 생성하기 위해 관리메뉴의 부모메뉴 아이디를 찾아서 지정한다.
at line 180
string|int
getNodeIdentifier()
Get the unique identifier for the node
at line 190
string
getNodeIdentifierName()
Get the unique identifier name for the node
at line 200
string|int
getParentNodeIdentifier()
Get the parent identifier for the node
at line 212
void
setParent(NodeInterface $item)
Set parent node
at line 221
mixed
getParent()
Return the parent node or null
at line 232
void
addChild(NodeInterface $item)
Add child node
at line 241
bool
hasChild()
Check having child and return the boolean result.
at line 256
void
setChildren(NodeInterface[] $children = array())
Set child nodes
at line 265
NodeInterface[]
getChildren()
Return the child node items or empty array
at line 275
string
getOrderKeyName()
Get the order key name for model
at line 288
void
setSelected(bool $selected, bool $parentSelect = true)
setIsSelected
at line 300
bool
isSelected()
isSelected
at line 313
mixed
jsonSerialize()
(PHP 5 >= 5.4.0)
Specify data which should be serialized to JSON