classes/Input/Sidebar.php
public function render()
    {
        // Massage the response from base controller subclassings of sidebar
        $items = array_map(function ($item) {

            // If a listing instance, apply defaults common to all sidebar instances
            if (is_a($item, 'Bkwld\Decoy\Fields\Listing')) {
                return $item->layout('sidebar')->parent($this->parent)->__toString();
            }

            // Anything else will be converted to a string in the next step
            return $item;
        }, array_merge($this->items, $this->ending_items));

        // Combine all listing items into a single string and return
        return array_reduce($items, function ($carry, $item) {
            return $carry.$item;
        }, '');
    }
public function render()
    {
        // Massage the response from base controller subclassings of sidebar
        $items = array_map(function ($item) {

            // If a listing instance, apply defaults common to all sidebar instances
            if (is_a($item, 'Bkwld\Decoy\Fields\Listing')) {
                return $item->layout('sidebar')->parent($this->parent)->__toString();
            }

            // Anything else will be converted to a string in the next step
            return $item;
        }, array_merge($this->items, $this->ending_items));

        // Combine all listing items into a single string and return
        return array_reduce($items, function ($carry, $item) {
            return $carry.$item;
        }, '');
    }
public function render ( ) { // Massage the response from base controller subclassings of sidebar $ items = array_map ( function ( $ item ) { // If a listing instance, apply defaults common to all sidebar instances if ( is_a ( $ item , 'Bkwld\Decoy\Fields\Listing' ) ) { return $ item -> layout ( 'sidebar' ) -> parent ( $ this -> parent ) -> __toString ( ) ; } // Anything else will be converted to a string in the next step return $ item ; } , array_merge ( $ this -> items , $ this -> ending_items ) ) ; // Combine all listing items into a single string and return return array_reduce ( $ items , function ( $ carry , $ item ) { return $ carry . $ item ; } , '' ) ; }
Render an array of listing objects to an HTML string

@return string HTML
Render an array of listing objects to an HTML string