Backend\Modules\Faq\Engine\Model::getAllFeedbackForQuestion PHP 메소드

getAllFeedbackForQuestion() 공개 정적인 메소드

Fetches all the feedback for a question
public static getAllFeedbackForQuestion ( integer $id ) : array
$id integer The question id.
리턴 array
    public static function getAllFeedbackForQuestion($id)
    {
        return (array) BackendModel::getContainer()->get('database')->getRecords('SELECT f.*
             FROM faq_feedback AS f
             WHERE f.question_id = ? AND f.processed = ?', array((int) $id, 'N'));
    }

Usage Example

예제 #1
0
파일: Edit.php 프로젝트: bwgraves/forkcms
 /**
  * Get the data
  */
 private function getData()
 {
     $this->record = (array) BackendFaqModel::get($this->id);
     $this->feedback = BackendFaqModel::getAllFeedbackForQuestion($this->id);
 }