File: D:/HostingSpaces/blijegasten/blijegasten.be/app/Komma/Shop/Search/Types/SearchResult.php
<?php
namespace App\Komma\Shop\Search\Types;
use App\Helpers\KommaHelpers;
use App\Komma\Documents\Models\Document;
use Illuminate\Database\Eloquent\Model;
class SearchResult
{
/** @var Model $node */
public $node;
/** @var string $shortName */
public $shortName;
/** @var string $name */
public $name;
/** @var string $route */
public $route;
/** @var Document $image */
public $image;
public function __construct(Model $model, string $name, string $route, Document $image = null)
{
$this->node = $model;
$this->shortName = strtolower(KommaHelpers::getShortNameFromClass($model));
$this->typeName = __('site/search.category.' .$this->shortName);
$this->name = $name;
$this->route = $route;
$this->image = $image;
}
}