* [task#131064] initial build function of thinkstepquote.
This commit is contained in:
@@ -16,4 +16,24 @@ class thinkStepQuote extends wg
|
||||
'citation?: int=1', // 引用方式
|
||||
'selectColumn?: string', // 选择列
|
||||
);
|
||||
|
||||
public static function getPageJS(): string
|
||||
{
|
||||
return file_get_contents(__DIR__ . DS . 'js' . DS . 'v1.js');
|
||||
}
|
||||
protected function build(): array
|
||||
{
|
||||
global $lang, $app;
|
||||
$app->loadLang('thinkstep');
|
||||
list($step, $setOption, $quoteTitle, $quoteQuestions, $citation, $selectColumn, $questionType) = $this->prop(array('step', 'setOption', 'quoteTitle', 'quoteQuestions', 'citation', 'selectColumn', 'questionType'));
|
||||
if($step)
|
||||
{
|
||||
$enableOther = $step->options->enableOther ?? 0;
|
||||
$setOption = isset($step->options->setOption) ? $step->options->setOption : false;
|
||||
$defaultQuote = !empty($quoteQuestions) ? $quoteQuestions[0]->id : null;
|
||||
$quoteTitle = isset($step->options->quoteTitle) ? $step->options->quoteTitle : $defaultQuote;
|
||||
$citation = isset($step->options->citation) ? $step->options->citation : 1;
|
||||
$selectColumn = isset($step->options->selectColumn) ? $step->options->selectColumn : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user