/**
  * Class constructor. Defines the related database table name.
  *
  * @since 2.0.0
  * @access public
  */
 public function __construct()
 {
     parent::__construct('Comment');
     $this->pageCache = Gdn::cache()->activeEnabled() && c('Properties.CommentModel.pageCache', false);
     $this->fireEvent('AfterConstruct');
 }
Esempio n. 2
0
 /**
  * Class constructor.
  */
 public function __construct()
 {
     parent::__construct('Comment');
     $this->FireEvent('AfterConstruct');
 }
Esempio n. 3
0
 /**
  * Class constructor.
  */
 public function __construct()
 {
     parent::__construct('Discussion');
 }
Esempio n. 4
0
 /**
  * Evented wrapper for Gdn_Model::SetField
  *
  * @param integer $RowID
  * @param string $Property
  * @param mixed $Value
  */
 public function setField($RowID, $Property, $Value = false)
 {
     if (!is_array($Property)) {
         $Property = array($Property => $Value);
     }
     $this->EventArguments['DiscussionID'] = $RowID;
     if (!is_array($Property)) {
         $this->EventArguments['SetField'] = array($Property => $Value);
     } else {
         $this->EventArguments['SetField'] = $Property;
     }
     parent::SetField($RowID, $Property, $Value);
     $this->fireEvent('AfterSetField');
 }
Esempio n. 5
0
 /**
  * Class constructor. Defines the related database table name.
  *
  * @since 2.0.0
  * @access public
  */
 public function __construct()
 {
     parent::__construct('Draft');
 }
Esempio n. 6
0
 /**
  * {@inheritdoc}
  */
 public function getCount($Wheres = '')
 {
     if (is_numeric($Wheres)) {
         deprecated('CommentModel->getCount(int)', 'CommentModel->getCountByDiscussion()');
         return $this->getCountByDiscussion($Wheres);
     }
     return parent::getCount($Wheres);
 }
Esempio n. 7
0
 /**
  * Evented wrapper for Gdn_Model::SetField
  *
  * @param integer $RowID
  * @param string $Property
  * @param mixed $Value
  */
 public function SetField($RowID, $Property, $Value = FALSE)
 {
     $this->EventArguments['DiscussionID'] = $RowID;
     $this->EventArguments['SetField'] = array($Property => $Value);
     parent::SetField($RowID, $Property, $Value);
     $this->fireEvent('AfterSetField');
 }
Esempio n. 8
0
 /**
  * Class constructor.
  */
 public function __construct()
 {
     parent::__construct('Comment');
 }
Esempio n. 9
0
 /**
  * {@inheritdoc}
  */
 public function getCount($Wheres = '')
 {
     if (is_numeric($Wheres)) {
         deprecated('DraftModel->getCount(int)', 'DraftModel->getCountByUser()');
         return $this->getCountByUser($Wheres);
     }
     return parent::getCount($Wheres);
 }
Esempio n. 10
0
 public function __construct()
 {
     parent::__construct('Media');
 }
Esempio n. 11
0
 /**
  * Class constructor. Defines the related database table name.
  *
  * @since 2.0.0
  * @access public
  */
 public function __construct()
 {
     parent::__construct('Comment');
     $this->pageCache = Gdn::Cache()->ActiveEnabled() && C('Properties.CommentModel.pageCache', true);
     $this->FireEvent('AfterConstruct');
 }