public function getMainPicUrl() { $img = $this->getMainPicPath(); if (file_exists(dirname(F::basePath()) . $img)) { return F::baseUrl() . $this->getMainPicPath(); } else { return $this->getHolderJs('350', '350'); } }