src/Support/Section.php
public function setViewData(array $data): SectionInterface
    {
        $this->data = $data;

        // Add default variables to the section view.
        // We provide a copy of the section instance
        // so we can iterate over its items from the view.
        $this->data = array_merge($data, [
            '__section' => $this
        ]);

        return $this;
    }
public function setViewData(array $data): SectionInterface
    {
        $this->data = $data;

        // Add default variables to the section view.
        // We provide a copy of the section instance
        // so we can iterate over its items from the view.
        $this->data = array_merge($data, [
            '__section' => $this
        ]);

        return $this;
    }
public function setViewData ( array $ data ) : SectionInterface { $ this -> data = $ data ; // Add default variables to the section view. // We provide a copy of the section instance // so we can iterate over its items from the view. $ this -> data = array_merge ( $ data , [ '__section' => $ this ] ) ; return $ this ; }
Set section view data array.

@param array $data

@return SectionInterface
Set section view data array .