28 lines
603 B
PHP
28 lines
603 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace Esun\Wiki\Model;
|
|
|
|
use Magento\Framework\Model\AbstractModel;
|
|
use Esun\Wiki\Model\ResourceModel\Category as CategoryResource;
|
|
|
|
class Category extends AbstractModel
|
|
{
|
|
public function isClickable(): bool
|
|
{
|
|
$value = $this->getData('is_clickable');
|
|
|
|
return $value === null || $value === '' || (int) $value !== 0;
|
|
}
|
|
|
|
public function isOpenByDefault(): bool
|
|
{
|
|
return (int) $this->getData('is_default_open') === 1;
|
|
}
|
|
|
|
protected function _construct(): void
|
|
{
|
|
$this->_init(CategoryResource::class);
|
|
}
|
|
}
|