projectmessages.class.php

来自「ProjectPier 源码 很好的项目管理程序」· PHP 代码 · 共 54 行

PHP
54
字号
<?php  /**  * ProjectMessages, generated on Sat, 04 Mar 2006 12:21:44 +0100 by   * DataObject generation tool  *  * @http://www.projectpier.org/  */  class ProjectMessages extends BaseProjectMessages {        /**    * Return messages that belong to specific project    *    * @param Project $project    * @param boolean $include_private Include private messages in the result    * @return array    */    static function getProjectMessages(Project $project, $include_private = false) {      if ($include_private) {        $conditions = array('`project_id` = ?', $project->getId());      } else {        $conditions = array('`project_id` = ? AND `is_private` = ?', $project->getId(), false);      } // if            return self::findAll(array(        'conditions' => $conditions,        'order' => '`created_on` DESC',      )); // findAll    } // getProjectMessages        /**    * Return project messages that are marked as important for specific project    *    * @param Project $project    * @param boolean $include_private Include private messages    * @return array    */    static function getImportantProjectMessages(Project $project, $include_private = false) {      if ($include_private) {        $conditions = array('`project_id` = ? AND `is_important` = ?', $project->getId(), true);      } else {        $conditions = array('`project_id` = ? AND `is_important` = ? AND `is_private` = ?', $project->getId(), true, false);      } // if            return self::findAll(array(        'conditions' => $conditions,        'order' => '`created_on` DESC',      )); // findAll    } // getImportantProjectMessages      } // ProjectMessages ?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?