mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-16 14:50:48 +03:00
Доработка тегов #725
This commit is contained in:
parent
5a02559269
commit
c8f7262605
|
@ -27,5 +27,22 @@
|
|||
*/
|
||||
class ModuleFavourite_EntityTag extends Entity
|
||||
{
|
||||
/**
|
||||
* Возвращает 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);
|
||||
|
||||
if ($oUser) {
|
||||
return $oUser->getUserWebPath() . 'favourites/topics/tag/' . urlencode($this->getText()) . '/';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -97,6 +97,15 @@ class ModuleTopic_EntityTopicTag extends Entity
|
|||
return $this->_getDataOne('size');
|
||||
}
|
||||
|
||||
/**
|
||||
* Возвращает URL страницы тегов
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUrl()
|
||||
{
|
||||
return Router::GetPath('tag') . urlencode($this->getText()) . '/';
|
||||
}
|
||||
|
||||
/**
|
||||
* Устанавливает ID тега
|
||||
|
|
Loading…
Reference in a new issue