Add configurable subjects to question sets
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Komponent\Component\Testquestions\Administrator\Table;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Table\Table;
|
||||
use Joomla\Database\DatabaseDriver;
|
||||
|
||||
class SubjectTable extends Table
|
||||
{
|
||||
public function __construct(DatabaseDriver $db)
|
||||
{
|
||||
parent::__construct('#__testquestions_subjects', 'id', $db);
|
||||
}
|
||||
|
||||
public function check($updateNulls = false): bool
|
||||
{
|
||||
$this->title = trim((string) $this->title);
|
||||
|
||||
return $this->title !== '' && parent::check($updateNulls);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user