<?php

defined('HOSTCMS') || exit('HostCMS: access denied.');

/**
 * Structure_Property_Model
 *
 * @package HostCMS
 * @subpackage Structure
 * @version 6.x
 * @copyright © 2005-2024, https://www.hostcms.ru
 */
class Structure_Property_Model extends Core_Entity
{
	/**
	 * Disable markDeleted()
	 * @var mixed
	 */
	protected $_marksDeleted = NULL;

	/**
	 * Belongs to relations
	 * @var array
	 */
	protected $_belongsTo = array(
		'site' => array(),
		'property' => array(),
	);

	/**
	 * Get Related Site
	 * @return Site_Model|NULL
	 * @hostcms-event structure_property.onBeforeGetRelatedSite
	 * @hostcms-event structure_property.onAfterGetRelatedSite
	 */
	public function getRelatedSite()
	{
		Core_Event::notify($this->_modelName . '.onBeforeGetRelatedSite', $this);

		$oSite = $this->Site;

		Core_Event::notify($this->_modelName . '.onAfterGetRelatedSite', $this, array($oSite));

		return $oSite;
	}
}