src/Charcoal/Admin/Property/HierarchicalObjectProperty.php
public function choices()
    {
        $choices = [];

        $proto = $this->proto();
        if (!$proto->source()->tableExists()) {
            return $choices;
        }

        $loader = $this->collectionModelLoader();

        $collection = new HierarchicalCollection($loader->load(), false);
        $collection->setPage($loader->page())
                   ->setNumPerPage($loader->numPerPage())
                   ->sortTree();

        return $this->parseChoices($collection);
    }
public function choices()
    {
        $choices = [];

        $proto = $this->proto();
        if (!$proto->source()->tableExists()) {
            return $choices;
        }

        $loader = $this->collectionModelLoader();

        $collection = new HierarchicalCollection($loader->load(), false);
        $collection->setPage($loader->page())
                   ->setNumPerPage($loader->numPerPage())
                   ->sortTree();

        return $this->parseChoices($collection);
    }
public function choices ( ) { $ choices = [ ] ; $ proto = $ this -> proto ( ) ; if ( ! $ proto -> source ( ) -> tableExists ( ) ) { return $ choices ; } $ loader = $ this -> collectionModelLoader ( ) ; $ collection = new HierarchicalCollection ( $ loader -> load ( ) , false ) ; $ collection -> setPage ( $ loader -> page ( ) ) -> setNumPerPage ( $ loader -> numPerPage ( ) ) -> sortTree ( ) ; return $ this -> parseChoices ( $ collection ) ; }
Retrieve the available choice structures, segmented as a tree.

@return array
Retrieve the available choice structures segmented as a tree .