本文整理汇总了PHP中thebuggenie\core\framework\Settings::isCommentTrailClean方法的典型用法代码示例。如果您正苦于以下问题:PHP Settings::isCommentTrailClean方法的具体用法?PHP Settings::isCommentTrailClean怎么用?PHP Settings::isCommentTrailClean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thebuggenie\core\framework\Settings
的用法示例。
在下文中一共展示了Settings::isCommentTrailClean方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __
disabled<?php
}
?>
>
<option value=1<?php
if (\thebuggenie\core\framework\Settings::isCommentTrailClean()) {
?>
selected<?php
}
?>
><?php
echo __("Don't post system comments when an issue is updated");
?>
</option>
<option value=0<?php
if (!\thebuggenie\core\framework\Settings::isCommentTrailClean()) {
?>
selected<?php
}
?>
><?php
echo __('Always post comments when an issue is updated');
?>
</option>
</select>
<?php
echo config_explanation(__('To keep the comment trail clean in issues, you can select not to post system comments when an issue is updated.') . "<br><br>(" . __('The issue log will always be updated regardless of this setting.') . ")");
?>
</td>
</tr>
<tr>
示例2: addSystemComment
/**
* Adds a system comment
*
* @param string $text Comment text
* @param integer $uid The user ID that posted the comment
*
* @return \thebuggenie\core\entities\Comment
*/
public function addSystemComment($text, $uid)
{
$comment = new Comment();
$comment->setContent($text);
$comment->setPostedBy($uid);
$comment->setTargetID($this->getID());
$comment->setTargetType(Comment::TYPE_ISSUE);
$comment->setSystemComment();
if (!\thebuggenie\core\framework\Settings::isCommentTrailClean()) {
$comment->save();
}
return $comment;
}
示例3: addSystemComment
/**
* Adds a system comment
*
* @param string $text Comment text
* @param integer $uid The user ID that posted the comment
*
* @return Comment
*/
public function addSystemComment($text, $uid, $module = 'core')
{
$comment = new Comment();
$comment->setContent($text);
$comment->setPostedBy($uid);
$comment->setTargetID($this->getID());
$comment->setTargetType(Comment::TYPE_ISSUE);
$comment->setSystemComment();
$comment->setModuleName($module);
if (!framework\Settings::isCommentTrailClean()) {
$comment->save();
}
return $comment;
}