PHP 클래스 Nestable\Services\NestableService

상속: use trait Nestable\MacrosTrait
파일 보기 프로젝트 열기: atayahmet/laravel-nestable 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$data Collection data.

보호된 프로퍼티들

프로퍼티 타입 설명
$active mixed Selectable values for html output.
$config array configuration vars.
$dropdownAttr array Dropdown attributes.
$multiple boolean Multiple dropdown status.
$optionAttr array Dropdown or Listbox item attributes.
$optionUlAttr
$parent string Parent key name.
$parents array Parent idset of current process.
$route array Route parameters.
$selected mixed Selectable values.

공개 메소드들

메소드 설명
__call ( $method, $args )
active ( ) : object Attribute insert helper for html render.
addAttr ( mixed $attr, mixed $value = '' ) : object Add attribute to
  • element.
  • attr ( array $attributes ) : object Set the attributes of generated dropdown.
    closeLi ( string $li ) : string Generate close li tag.
    closeUl ( string $ul ) : string Generate close ul tag.
    hasChild ( string $key = null, mixed $value = null, Collection $data = null ) : boolean Child menu checker.
    isValid ( string $type, $render = false ) : mixed Array validator.
    make ( mixed $data ) : object Set the data to wrap class.
    multiple ( ) : object Multiple dropdown menu.
    openLi ( array $li, $extra = '' ) : string Generate open li tag.
    parent ( integer $parent = false ) : object Set the parent id for child elements.
    renderAsArray ( object $data = false, integer $parent ) : Recursion | array Pass to array of all data as nesting.
    renderAsDropdown ( object $data = false, integer $parent, boolean $first = true, integer $level ) : string Convert to dropdown.
    renderAsHtml ( object $data = false, integer $parent, boolean $first = true ) : string Pass to html (ul:li) as nesting.
    renderAsJson ( object $data = false, integer $parent ) : Recursion | array Pass to json string of all data as nesting.
    renderAsMultiple ( )
    route ( array $route ) Route generator.
    save ( array $params ) Save the parameters.
    selected ( integer | array $values ) : object Save the will select values.
    ul ( string $items = false, $parent_id ) : string Generate open ul tag.
    ulAttr ( mixed $attr, mixed $value = '' ) : object Add attribute to
      element.

    보호된 메소드들

    메소드 설명
    addAttributes ( ) : string Contact th attributes to dropdown.
    doActive ( array $href, string $label ) : string Insert all saved attributes to
  • element.
  • doSelect ( mixed $value, $label ) : string Set the as selected of items.
    renderAttr ( mixed $attributes = false, mixed $params = false ) : string Render the attritues of html elements.
    setParameters ( array $args ) initialize parameters (toArray, toHtml, toDropdown).
    url ( string $path, $label ) : string URL Generator.

    메소드 상세

    __call() 공개 메소드

    public __call ( $method, $args )

    active() 공개 메소드

    Attribute insert helper for html render.
    public active ( ) : object
    리턴 object (instance)

    addAttr() 공개 메소드

    Add attribute to
  • element.
  • public addAttr ( mixed $attr, mixed $value = '' ) : object
    $attr mixed
    $value mixed
    리턴 object (instance)

    addAttributes() 보호된 메소드

    Contact th attributes to dropdown.
    protected addAttributes ( ) : string
    리턴 string

    attr() 공개 메소드

    Set the attributes of generated dropdown.
    public attr ( array $attributes ) : object
    $attributes array
    리턴 object (instance)

    closeLi() 공개 메소드

    Generate close li tag.
    public closeLi ( string $li ) : string
    $li string
    리턴 string

    closeUl() 공개 메소드

    Generate close ul tag.
    public closeUl ( string $ul ) : string
    $ul string
    리턴 string

    doActive() 보호된 메소드

    Insert all saved attributes to
  • element.
  • protected doActive ( array $href, string $label ) : string
    $href array
    $label string
    리턴 string

    doSelect() 보호된 메소드

    Set the as selected of items.
    protected doSelect ( mixed $value, $label ) : string
    $value mixed
    리턴 string

    hasChild() 공개 메소드

    Child menu checker.
    public hasChild ( string $key = null, mixed $value = null, Collection $data = null ) : boolean
    $key string
    $value mixed
    $data Illuminate\Support\Collection Illuminate\Support\Collection as Collect
    리턴 boolean

    isValid() 공개 메소드

    Array validator.
    public isValid ( string $type, $render = false ) : mixed
    $type string
    리턴 mixed

    make() 공개 메소드

    Set the data to wrap class.
    public make ( mixed $data ) : object
    $data mixed
    리턴 object (instance)

    multiple() 공개 메소드

    Multiple dropdown menu.
    public multiple ( ) : object
    리턴 object (instance)

    openLi() 공개 메소드

    Generate open li tag.
    public openLi ( array $li, $extra = '' ) : string
    $li array
    리턴 string

    parent() 공개 메소드

    Set the parent id for child elements.
    public parent ( integer $parent = false ) : object
    $parent integer
    리턴 object (instance)

    renderAsArray() 공개 메소드

    Pass to array of all data as nesting.
    public renderAsArray ( object $data = false, integer $parent ) : Recursion | array
    $data object Illuminate\Support\Collection
    $parent integer
    리턴 Recursion | array

    renderAsDropdown() 공개 메소드

    Convert to dropdown.
    public renderAsDropdown ( object $data = false, integer $parent, boolean $first = true, integer $level ) : string
    $data object Illuminate\Support\Collection
    $parent integer Current parent id
    $first boolean first run
    $level integer nest counter
    리턴 string

    renderAsHtml() 공개 메소드

    Pass to html (ul:li) as nesting.
    public renderAsHtml ( object $data = false, integer $parent, boolean $first = true ) : string
    $data object Illuminate\Support\Collection
    $parent integer Current parent id
    $first boolean First run
    리턴 string

    renderAsJson() 공개 메소드

    Pass to json string of all data as nesting.
    public renderAsJson ( object $data = false, integer $parent ) : Recursion | array
    $data object Illuminate\Support\Collection
    $parent integer
    리턴 Recursion | array

    renderAsMultiple() 공개 메소드

    public renderAsMultiple ( )

    renderAttr() 보호된 메소드

    Render the attritues of html elements.
    protected renderAttr ( mixed $attributes = false, mixed $params = false ) : string
    $attributes mixed
    $params mixed
    리턴 string

    route() 공개 메소드

    Route generator.
    public route ( array $route )
    $route array

    save() 공개 메소드

    Save the parameters.
    public save ( array $params )
    $params array

    selected() 공개 메소드

    Save the will select values.
    public selected ( integer | array $values ) : object
    $values integer | array
    리턴 object (instance)

    setParameters() 보호된 메소드

    initialize parameters (toArray, toHtml, toDropdown).
    protected setParameters ( array $args )
    $args array

    ul() 공개 메소드

    Generate open ul tag.
    public ul ( string $items = false, $parent_id ) : string
    $items string
    리턴 string

    ulAttr() 공개 메소드

    Add attribute to
      element.
    public ulAttr ( mixed $attr, mixed $value = '' ) : object
    $attr mixed
    $value mixed
    리턴 object (instance)

    url() 보호된 메소드

    URL Generator.
    protected url ( string $path, $label ) : string
    $path string
    리턴 string

    프로퍼티 상세

    $active 보호되어 있는 프로퍼티

    Selectable values for html output.
    protected mixed $active
    리턴 mixed

    $config 보호되어 있는 프로퍼티

    configuration vars.
    protected array $config
    리턴 array

    $data 공개적으로 프로퍼티

    Collection data.
    public $data

    $dropdownAttr 보호되어 있는 프로퍼티

    Dropdown attributes.
    protected array $dropdownAttr
    리턴 array

    $multiple 보호되어 있는 프로퍼티

    Multiple dropdown status.
    protected bool $multiple
    리턴 boolean

    $optionAttr 보호되어 있는 프로퍼티

    Dropdown or Listbox item attributes.
    protected array $optionAttr
    리턴 array

    $optionUlAttr 보호되어 있는 프로퍼티

    protected $optionUlAttr

    $parent 보호되어 있는 프로퍼티

    Parent key name.
    protected string $parent
    리턴 string

    $parents 보호되어 있는 프로퍼티

    Parent idset of current process.
    protected array $parents
    리턴 array

    $route 보호되어 있는 프로퍼티

    Route parameters.
    protected array $route
    리턴 array

    $selected 보호되어 있는 프로퍼티

    Selectable values.
    protected mixed $selected
    리턴 mixed