koblog/bl-kernel/pagetypes.class.php
2025-01-25 15:01:12 +01:00

36 lines
No EOL
634 B
PHP

<?php defined('KOBLOG') or die('Koblog CMS.');
class PageTypes extends dbJSON {
protected $dbFields = array(
'name'=>'',
'plural'=>'',
'icon'=>'fa-file'
);
function __construct()
{
parent::__construct(DB_PAGE_TYPES);
}
public function getDefaultFields()
{
return $this->dbFields;
}
// Return an array with the database of the user, FALSE otherwise
public function getTypeDB($type)
{
if ($this->exists($type)) {
return $this->db[$type];
}
return false;
}
// Return TRUE if the type exists, FALSE otherwise
public function exists($type)
{
return isset($this->db[$type]);
}
}