Merge pull request #1046 from openclassify/dia

#3820 TEXTİLCY ( İLAN EKLEMEK İSTEDİĞİNDE; SİTE AÇILMIYOR)
This commit is contained in:
Ozcan Durak 2021-04-19 15:41:05 +03:00 committed by GitHub
commit 971119fdd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -5,6 +5,14 @@ use Anomaly\Streams\Platform\Model\Cats\CatsCategoryEntryModel;
class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
{
public function getCat($id)
{
return CategoryModel::query()
->where('cats_category.id', $id)
->whereRaw('deleted_at IS NULL')
->first();
}
public function getParentCats($id, $type = null, $noMainCat = true)
{
$cat = $this->getCat($id);

View File

@ -4,6 +4,8 @@ use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
interface CategoryInterface extends EntryInterface
{
public function getCat($id);
public function getParentCats($id, $type = null, $noMainCat = true);
public function getMetaKeywords();