36 lines
634 B
PHP
36 lines
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]);
|
||
|
}
|
||
|
|
||
|
}
|