Advertisement
Guest User

IPS 4: Review Example

a guest
Dec 10th, 2013
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.53 KB | None | 0 0
  1. <?php
  2.  
  3. namespace IPS\downloads\File;
  4.  
  5. /**
  6.  * File Review Model
  7.  */
  8. class _Review extends \IPS\Content\Review implements \IPS\Content\EditHistory, \IPS\Content\ReportCenter, \IPS\Content\Hideable, \IPS\Content\Reputation
  9. {
  10.     /**
  11.      * @brief   [ActiveRecord] Multiton Store
  12.      */
  13.     protected static $multitons;
  14.    
  15.     /**
  16.      * @brief   Default Values
  17.      */
  18.     protected static $defaultValues = NULL;
  19.    
  20.     /**
  21.      * @brief   [Content\Comment]   Item Class
  22.      */
  23.     public static $itemClass = 'IPS\downloads\File';
  24.    
  25.     /**
  26.      * @brief   [ActiveRecord] Database Table
  27.      */
  28.     public static $databaseTable = 'downloads_reviews';
  29.    
  30.     /**
  31.      * @brief   [ActiveRecord] Database Prefix
  32.      */
  33.     public static $databasePrefix = 'review_';
  34.    
  35.     /**
  36.      * @brief   Database Column Map
  37.      */
  38.     public static $databaseColumnMap = array(
  39.         'item'              => 'fid',
  40.         'author'            => 'mid',
  41.         'author_name'       => 'author_name',
  42.         'content'           => 'text',
  43.         'date'              => 'date',
  44.         'ip_address'        => 'ip',
  45.         'edit_time'         => 'edit_time',
  46.         'edit_member_name'  => 'edit_name',
  47.         'edit_show'         => 'append_edit',
  48.         'rating'            => 'rating',
  49.         'votes_total'       => 'votes',
  50.         'votes_helpful'     => 'votes_helpful',
  51.         'votes_data'        => 'votes_data',
  52.         'approved'          => 'approved',
  53.     );
  54.    
  55.     /**
  56.      * @brief   Application
  57.      */
  58.     public static $application = 'downloads';
  59.    
  60.     /**
  61.      * @brief   Title
  62.      */
  63.     public static $title = 'downloads_file_review';
  64.    
  65.     /**
  66.      * @brief   Icon
  67.      */
  68.     public static $icon = 'download';
  69.    
  70.     /**
  71.      * @brief   Reputation Type
  72.      */
  73.     public static $reputationType = 'review_id';
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement