Spatie\GoogleTagManager\DataLayer::toArray PHP 메소드

toArray() 공개 메소드

Return an array representation of the data layer.
public toArray ( ) : array
리턴 array
    public function toArray()
    {
        return $this->data;
    }

Usage Example

 /**
  * Retrieve the data layer's data for the next request.
  * 
  * @return array
  */
 public function getFlashData()
 {
     return $this->flashDataLayer->toArray();
 }