public function jsonSerialize()
    {
        $properties = [
            '_templatePath', '_template', '_plugin', '_theme', '_layout', '_autoLayout',
            '_layoutPath', '_name', '_className', '_options', '_helpers'
        ];

        $array = [];

        foreach ($properties as $property) {
            $array[$property] = $this->{$property};
        }

        return array_filter($array, function ($i) {
            return !is_array($i) && strlen($i) || !empty($i);
        });
    }
public function jsonSerialize()
    {
        $properties = [
            '_templatePath', '_template', '_plugin', '_theme', '_layout', '_autoLayout',
            '_layoutPath', '_name', '_className', '_options', '_helpers'
        ];

        $array = [];

        foreach ($properties as $property) {
            $array[$property] = $this->{$property};
        }

        return array_filter($array, function ($i) {
            return !is_array($i) && strlen($i) || !empty($i);
        });
    }
public function jsonSerialize ( ) { $ properties = [ '_templatePath' , '_template' , '_plugin' , '_theme' , '_layout' , '_autoLayout' , '_layoutPath' , '_name' , '_className' , '_options' , '_helpers' ] ; $ array = [ ] ; foreach ( $ properties as $ property ) { $ array [ $ property ] = $ this -> { $ property } ; } return array_filter ( $ array , function ( $ i ) { return ! is_array ( $ i ) && strlen ( $ i ) || ! empty ( $ i ) ; } ) ; }
Serializes the view builder object to a value that can be natively
serialized and re-used to clone this builder instance.

@return array Serializable array of configuration properties.
Serializes the view builder object to a value that can be natively serialized and re - used to clone this builder instance .