/** * @return array */ public function generate() { if ($this->time) { $data = ['time' => $this->time->format(Pin::TIME_FORMAT), 'layout' => parent::generate()]; unset($data['layout']['time']); return $data; } return ['layout' => parent::generate()]; }
/** * @return array */ public function generate() { return ['time' => $this->time->format(Pin::TIME_FORMAT), 'layout' => parent::generate()]; }