[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

/core/classes/ -> MantisColumn.class.php (source)

   1  <?php
   2  # MantisBT - A PHP based bugtracking system
   3  
   4  # Copyright (C) 2002 - 2011  MantisBT Team - mantisbt-dev@lists.sourceforge.
   5  
   6  # MantisBT is free software: you can redistribute it and/or modify
   7  # it under the terms of the GNU General Public License as published by
   8  # the Free Software Foundation, either version 2 of the License, or
   9  # (at your option) any later version.
  10  #
  11  # MantisBT is distributed in the hope that it will be useful,
  12  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14  # GNU General Public License for more details.
  15  #
  16  # You should have received a copy of the GNU General Public License
  17  # along with MantisBT.  If not, see <http://www.gnu.org/licenses/>.
  18  
  19  /**
  20   * Base class that implements basic column functionality
  21   * and integration with MantisBT.
  22   * @package MantisBT
  23   * @subpackage classes
  24   */
  25  abstract class MantisColumn {
  26  
  27      /**
  28       * Column title, as displayed to the user.
  29       */
  30      public $title = null;
  31  
  32      /**
  33       * Column name, as selected in the manage columns interfaces.
  34       */
  35      public $column = null;
  36  
  37      /**
  38       * Column is sortable by the user.  Setting this to true implies that
  39       * the column will properly implement the sortquery() method.
  40       */
  41      public $sortable = false;
  42  
  43      /**
  44       * Build the SQL query elements 'join' and 'order' as used by
  45       * core/filter_api.php to create the filter sorting query.
  46       * @param string Sorting order ('ASC' or 'DESC')
  47       * @return array Keyed-array with query elements; see developer guide
  48       */
  49  	public function sortquery( $p_dir ) {}
  50  
  51      /**
  52       * Allow plugin columns to pre-cache data for all issues
  53       * that will be shown in a given view.  This is preferable to
  54       * the alternative option of querying the database for each
  55       * issue as the display() method is called.
  56       * @param array Bug objects
  57       */
  58  	public function cache( $p_bugs ) {}
  59  
  60      /**
  61       * Function to display column data for a given bug row.
  62       * @param object Bug object
  63       * @param int Column display target
  64       */
  65      abstract public function display( $p_bug, $p_columns_target );
  66  }
  67  


Generated: Thu Jul 28 15:48:31 2011 Cross-referenced by PHPXref 0.7