<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/

class Comment_Model_DbTable_Emotiongalleries extends Engine_Db_Table
{
  protected $_rowClass = 'Comment_Model_Gallery';
  public function getPaginator($params = array())
  {
    return Zend_Paginator::factory($this->getGallery($params));
  }
  public function getGallery($params = array())
  {
    $select = ($this->select());
    if (!empty($params['type']) && $params['type'] && $params['type'] == 'user') {
      $select->where('enabled =?', 1);
    }
    if (!empty($params['fetchAll'])) {
      return $this->fetchAll($select);
    }
    return $select;

  }
}
