public function __construct($directory, $data) { $this->data = $data; $this->images = FileHelper::getImages('data' . (strlen($directory) > 0 ? '/' : '') . $directory . '/images'); if ($this->images != null) { foreach ($this->images as $key => $image) { if (Model::endsWith($image, 'logo.png')) { $this->logo = $image; unset($this->images[$key]); } if (Model::endsWith($image, 'images.zip')) { $this->imageZip = $image; unset($this->images[$key]); } if (Model::endsWith($image, 'logo.zip')) { $this->logoZip = $image; unset($this->images[$key]); } } } }