2012-03-27 13:45:52 +03:00
|
|
|
<?php
|
2014-10-08 08:20:29 +03:00
|
|
|
/*
|
|
|
|
* LiveStreet CMS
|
|
|
|
* Copyright © 2013 OOO "ЛС-СОФТ"
|
|
|
|
*
|
|
|
|
* ------------------------------------------------------
|
|
|
|
*
|
|
|
|
* Official site: www.livestreetcms.com
|
|
|
|
* Contact e-mail: office@livestreetcms.com
|
|
|
|
*
|
|
|
|
* GNU General Public License, version 2:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
*
|
|
|
|
* ------------------------------------------------------
|
|
|
|
*
|
|
|
|
* @link http://www.livestreetcms.com
|
|
|
|
* @copyright 2013 OOO "ЛС-СОФТ"
|
|
|
|
* @author Maxim Mzhelskiy <rus.engine@gmail.com>
|
|
|
|
*
|
|
|
|
*/
|
2012-03-27 13:45:52 +03:00
|
|
|
|
2012-06-24 10:20:49 +03:00
|
|
|
/**
|
|
|
|
* Объект сущности тега для избранного
|
|
|
|
*
|
2014-10-08 08:20:29 +03:00
|
|
|
* @package application.modules.favourite
|
2012-06-24 10:20:49 +03:00
|
|
|
* @since 1.0
|
|
|
|
*/
|
2014-10-08 11:49:34 +03:00
|
|
|
class ModuleFavourite_EntityTag extends Entity
|
|
|
|
{
|
2015-11-09 14:33:13 +02:00
|
|
|
/**
|
|
|
|
* Возвращает URL страницы тега
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getUrl()
|
|
|
|
{
|
|
|
|
$_this = $this;
|
|
|
|
$oUser = $this->Cache_Remember("favourite_tag_user_{$this->getUserId()}",
|
|
|
|
function () use ($_this) {
|
|
|
|
return $_this->User_GetUserById($_this->getUserId());
|
|
|
|
}, false, array(), 'life', true);
|
2012-03-27 13:45:52 +03:00
|
|
|
|
2015-11-09 14:33:13 +02:00
|
|
|
if ($oUser) {
|
|
|
|
return $oUser->getUserWebPath() . 'favourites/topics/tag/' . urlencode($this->getText()) . '/';
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
2014-05-28 08:37:30 +03:00
|
|
|
}
|