public static function getByPath($path)
{
$path = Element\Service::correctPath($path);
try {
$document = new Document();
// validate path
if (Tool::isValidPath($path)) {
$document->getDao()->getByPath($path);
}
return self::getById($document->getId());
} catch (\Exception $e) {
Logger::debug($e->getMessage());
}
return null;
}