public function processAdd() { $object = parent::processAdd(); // Cover if (isset($_FILES['cover']) && $_FILES['cover']['size'] > 0) { $object->cover = pathinfo($_FILES['cover']['name'], PATHINFO_EXTENSION); $object->update(); } if (!empty($object->cover)) { $this->createCover($_FILES['cover']['tmp_name'], $object); } $this->updateAssoShop($object->id); return true; }
public function processAdd() { $object = parent::processAdd(); // Cover if (isset($_FILES['cover']) && $_FILES['cover']['size'] > 0) { $object->cover = pathinfo($_FILES['cover']['name'], PATHINFO_EXTENSION); $object->update(); } if (!empty($object->cover)) { $this->createCover($_FILES['cover']['tmp_name'], $object); } // Featured if (isset($_FILES['featured']) && $_FILES['featured']['size'] > 0) { $object->featured = pathinfo($_FILES['featured']['name'], PATHINFO_EXTENSION); $object->update(); } if (!empty($object->featured)) { $this->createFeatured($_FILES['featured']['tmp_name'], $object); } $languages = Language::getLanguages(false); $this->updateTags($languages, $object); $this->updateAssoShop($object->id); return $object; }
public function processAdd() { $object = parent::processAdd(); $this->updateAssoShop($object->id); return $object; }