init
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user