[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/cms/src/model/ -> lmbCmsNewsItem.class.php (source)

   1  <?php
   2  /*
   3   * Limb PHP Framework
   4   *
   5   * @link http://limb-project.com 
   6   * @copyright  Copyright &copy; 2004-2007 BIT(http://bit-creative.com)
   7   * @license    LGPL http://www.gnu.org/copyleft/lesser.html 
   8   */
   9  
  10  lmb_require('limb/active_record/src/lmbActiveRecord.class.php');
  11  
  12  /**

  13   * class lmbCmsNewsItem.

  14   *

  15   * @package cms

  16   * @version $Id$

  17   */
  18  class lmbCmsNewsItem extends lmbActiveRecord
  19  {
  20    protected $_db_table_name = 'news_item';
  21  
  22    protected $_lazy_attributes = array('content');
  23  
  24    protected $_has_one = array('node' => array('field' => 'node_id',
  25                                                'class' => 'lmbCmsNode'));
  26  
  27    protected $_many_belongs_to = array('image' => array('field' => 'image_id',
  28                                                         'class' => 'lmbCmsImage',
  29                                                         'cascade_delete' => false,
  30                                                         'can_be_null' => true));
  31  
  32    protected function _createValidator()
  33    {
  34      $validator = new lmbValidator();
  35      $validator->addRequiredRule('news_date');
  36      $validator->addRequiredRule('annotation');
  37      return $validator;
  38    }
  39  
  40  }
  41  ?>


Generated: Fri Dec 5 04:05:07 2008 Cross-referenced by PHPXref 0.7