/** * Delete the physical file(s) associated with this Pagefile * */ public function unlink() { parent::unlink(); $this->removeVariations(); return $this; }
/** * Install this Pagefile * * Implies copying the file to the correct location (if not already there), and populating it's name * * @param string $filename Full path and filename of file to install * @throws WireException * */ protected function ___install($filename) { parent::___install($filename); if (!$this->width()) { parent::unlink(); throw new WireException($this->_('Unable to install invalid image')); } }