* [story#69541,0.5h] add getDocBlockContent.
This commit is contained in:
+17
-2
@@ -3776,8 +3776,8 @@ class docModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文档块内容。
|
||||
* Get doc block content.
|
||||
* 获取文档块。
|
||||
* Get doc block.
|
||||
*
|
||||
* @param int $blockID
|
||||
* @access public
|
||||
@@ -3787,4 +3787,19 @@ class docModel extends model
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_DOCBLOCK)->where('id')->eq($blockID)->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文档块内容。
|
||||
* Get doc block content.
|
||||
*
|
||||
* @param int $blockID
|
||||
* @access public
|
||||
* @return array|bool
|
||||
*/
|
||||
public function getDocBlockContent(int $blockID): array|bool
|
||||
{
|
||||
$content = $this->dao->select('content')->from(TABLE_DOCBLOCK)->where('id')->eq($blockID)->fetch('content');
|
||||
if(!$content) return false;
|
||||
return json_decode($content, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user