<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
class Event_Model_Category extends Core_Model_Category
{
  protected $_searchTriggers = false;
  protected $_route = 'event_general';

  public function getTitle()
  {
    return $this->title;
  }

  public function getUsedCount()
  {
    $eventTable = Engine_Api::_()->getItemTable('event');
    return $eventTable->select()
        ->from($eventTable, new Zend_Db_Expr('COUNT(event_id)'))
        ->where('category_id = ?', $this->category_id)
        ->query()
        ->fetchColumn();
  }

  public function isOwner($owner)
  {
    return false;
  }

  public function getOwner($recurseType = null)
  {
    return $this;
  }
}
