public function onFileAction(MOXMAN_Vfs_FileActionEventArgs $args) { if ($args->isAction("insert")) { $this->add($args->getFile()->getPublicPath()); } if ($args->isAction("delete")) { $this->remove((object) array("paths" => array($args->getFile()->getPublicPath()))); } }
public function onFileAction(MOXMAN_Vfs_FileActionEventArgs $args) { if ($args->getFile()->isDirectory()) { return; } if ($args->isAction("add") && (!isset($args->getData()->thumb) || !$args->getData()->thumb)) { $this->add($args->getFile()->getPublicPath()); } if ($args->isAction("delete")) { $this->remove((object) array("paths" => array($args->getFile()->getPublicPath()))); } }