public function __construct(Resource $resource) { $this->resource = $resource; $this->pathname = (string) $resource->getPathname(); }
public function __construct(ResourceModel $resource) { $this->id = $resource->getId(); $this->project = (string) $resource->getProject()->getSlug(); $this->pathname = (string) $resource->getPathname(); }