public function toArray(SxModule_Eyecatchers $item, $type = '*') { $data = array('id' => $item->getId(), 'date_created' => $item->getDateCreated(), 'date_updated' => $item->getDateUpdated(), 'picture' => $item->getPicture(), 'place' => $item->getPlace(), 'active' => $item->getActive()); $tsl = array('tsl_id' => $item->getTslId(), 'lng' => $item->getLng(), 'url' => $item->getUrl(), 'title' => $item->getTitle(), 'subtitle' => $item->getSubtitle()); if ($type == 'item') { return $data; } elseif ($type == 'tsl') { return $tsl; } return array_merge($data, $tsl); }