method delete documentation in bbn\Appui\Medias
Deletes the given media
function(string $id)
{
if (Str::isUid($id)) {
$cf =& $this->class_cfg;
$media = $this->getMedia($id, true);
if ($media
&& ($path = X::dirname($media['file']))
&& is_file($media['file'])
&& $this->db->delete($cf['table'], [$cf['arch']['medias']['id'] => $id])
) {
if ($this->fs->delete($path, false)) {
X::cleanStoragePath($path);
}
return true;
}
}
return false;
}
Deletes the given media BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2023
BBN Solutions