public function getIcon()
{
$icon = $this->getMetaData('extra.xpressengine.icon');
if ($icon === null) {
return null;
}
$path = $this->getPath($icon);
if (realpath($path) !== false) {
$class = $this->class;
$file = $class::asset($icon);
return $file;
}
if (realpath(base_path($icon)) !== false) {
return asset($icon);
}
return null;
}