mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 23:06:08 -06:00
Merge branch 'master' of https://github.com/openclassify/openclassify
This commit is contained in:
commit
dc0e185fc7
@ -62,12 +62,11 @@ class AdvPresenter extends EntryPresenter
|
|||||||
public function isCorporate()
|
public function isCorporate()
|
||||||
{
|
{
|
||||||
$user_id = $this->getObject()->created_by;
|
$user_id = $this->getObject()->created_by;
|
||||||
if ($user_id->register_type != null) {
|
if ($user_id && $user_id->register_type !== null) {
|
||||||
return $user_id->register_type;
|
return $user_id->register_type;
|
||||||
} else {
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function priceFormat($adv)
|
public function priceFormat($adv)
|
||||||
|
|||||||
@ -13,9 +13,10 @@ class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
|
|||||||
|
|
||||||
public function getIconUrlAttribute()
|
public function getIconUrlAttribute()
|
||||||
{
|
{
|
||||||
return $this->dispatch(
|
if ($this->icon === null) {
|
||||||
new MakeImageInstance($this->icon ?? 'visiosoft.module.advs::images/listing/sample-cat-icon.svg', 'img')
|
return $this->dispatch(new MakeImageInstance('visiosoft.module.advs::images/listing/sample-cat-icon.svg', 'img'))->url();
|
||||||
)->url();
|
}
|
||||||
|
return $this->icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCat($id)
|
public function getCat($id)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user