本文整理汇总了PHP中CFactory::setActiveProfile方法的典型用法代码示例。如果您正苦于以下问题:PHP CFactory::setActiveProfile方法的具体用法?PHP CFactory::setActiveProfile怎么用?PHP CFactory::setActiveProfile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFactory
的用法示例。
在下文中一共展示了CFactory::setActiveProfile方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onLoginUser
/**
* This method should handle any login logic and report back to the subject
*
* @access public
* @param array holds the user data
* @param array extra options
* @return boolean True on success
* @since 1.5
*/
function onLoginUser($user, $options)
{
CFactory::load('helpers', 'user');
$id = cGetUserId($user['username']);
CFactory::setActiveProfile($id);
return true;
}
示例2: sent
/**
* View all sent emails
*/
public function sent()
{
CFactory::setActiveProfile();
$model = $this->getModel('inbox');
$msg = $model->getSent();
$modMsg = array();
$view = $this->getView('inbox');
// Add small avatar to each image
$avatarModel = $this->getModel('avatar');
if (!empty($msg)) {
foreach ($msg as $key => $val) {
if (is_array($val->to)) {
// multiuser
$tmpNameArr = array();
$tmpAvatar = array();
//avatar
foreach ($val->to as $toId) {
$user = CFactory::getUser($toId);
$tmpAvatar[] = $user->getThumbAvatar();
$tmpNameArr[] = $user->getDisplayName();
}
$msg[$key]->smallAvatar = $tmpAvatar;
$msg[$key]->to_name = $tmpNameArr;
}
}
}
$data = new stdClass();
$data->msg = $msg;
$my = CFactory::getUser();
$newFilter['user_id'] = $my->id;
if ($my->id == 0) {
return $this->blockUnregister();
}
$data->inbox = $model->countUnRead($newFilter);
$data->pagination = $model->getPagination();
$this->_icon = 'sent';
echo $view->get('sent', $data);
}
示例3: _userPhoto
function _userPhoto()
{
$mainframe =& JFactory::getApplication();
$document =& JFactory::getDocument();
// Get necessary properties and load the libraries
CFactory::load('models', 'photos');
CFactory::load('helpers', 'friends');
$my = CFactory::getUser();
$model = CFactory::getModel('photos');
$albumId = JRequest::getVar('albumid', '', 'GET');
$defaultId = JRequest::getVar('photoid', '', 'GET');
if (empty($albumId)) {
echo JText::_('CC NO PROPER ALBUM ID');
return;
}
// Load the album table
$album =& JTable::getInstance('Album', 'CTable');
$album->load($albumId);
// Since the URL might not contain userid, we need to get the user object from the creator
$user = CFactory::getUser($album->creator);
if (!$user->block || COwnerHelper::isCommunityAdmin($my->id)) {
// Set the current user's active profile
CFactory::setActiveProfile($album->creator);
// Get list of photos and set some limit to be displayed.
// @todo: make limit configurable? set to 1000, unlimited?
$photos = $model->getPhotos($albumId, 1000);
$pagination = $model->getPagination();
CFactory::load('helpers', 'pagination');
// @todo: make limit configurable?
$paging = CPaginationLibrary::getLinks($pagination, 'photos,ajaxPagination', $albumId, 10);
// Set document title
CFactory::load('helpers', 'string');
$document->setTitle($album->name);
// @checks: Test if album doesnt have any default photo id. We need to get the first row
// of the photos to be the default
if ($album->photoid == '0') {
$album->photoid = count($photos) >= 1 ? $photos[0]->id : '0';
}
// Try to see if there is any photo id in the query
$defaultId = !empty($defaultId) ? $defaultId : $album->photoid;
// Load the default photo
$photo =& JTable::getInstance('Photo', 'CTable');
$photo->load($defaultId);
// If default has an id of 0, we need to tell the template to dont process anything
$default = $photo->id == 0 ? false : $photo;
// Load User params
$params =& $user->getParams();
// site visitor
$relation = 10;
// site members
if ($my->id != 0) {
$relation = 20;
}
// friends
if (CFriendsHelper::isConnected($my->id, $user->id)) {
$relation = 30;
}
// mine
if (COwnerHelper::isMine($my->id, $user->id)) {
$relation = 40;
}
if ($my->id != $user->id) {
$this->attachMiniHeaderUser($user->id);
}
CFactory::load('helpers', 'owner');
// @todo: respect privacy settings
if ($relation < $params->get('privacyPhotoView') && !COwnerHelper::isCommunityAdmin()) {
echo JText::_('CC ACCESS FORBIDDEN');
return;
}
CFactory::load('helpers', 'owner');
//friend list for photo tag
CFactory::load('libraries', 'phototagging');
$tagging = new CPhotoTagging();
for ($i = 0; $i < count($photos); $i++) {
$item = JTable::getInstance('Photo', 'CTable');
$item->bind($photos[$i]);
$photos[$i] = $item;
$row =& $photos[$i];
$taggedList = $tagging->getTaggedList($row->id);
for ($t = 0; $t < count($taggedList); $t++) {
$tagItem =& $taggedList[$t];
$tagUser = CFactory::getUser($tagItem->userid);
$canRemoveTag = 0;
// 1st we check the tagged user is the photo owner.
// If yes, canRemoveTag == true.
// If no, then check on user is the tag creator or not.
// If yes, canRemoveTag == true
// If no, then check on user whether user is being tagged
if (COwnerHelper::isMine($my->id, $row->creator) || COwnerHelper::isMine($my->id, $tagItem->created_by) || COwnerHelper::isMine($my->id, $tagItem->userid)) {
$canRemoveTag = 1;
}
$tagItem->user = $tagUser;
$tagItem->canRemoveTag = $canRemoveTag;
}
$row->tagged = $taggedList;
}
$friendModel = CFactory::getModel('friends');
$friends = $friendModel->getFriends($my->id, '', false);
array_unshift($friends, $my);
//.........这里部分代码省略.........
示例4: _groupVideo
public function _groupVideo()
{
$mainframe = JFactory::getApplication();
$document = JFactory::getDocument();
// Get necessary properties and load the libraries
CFactory::load('models', 'videos');
$my = CFactory::getUser();
$model = CFactory::getModel('videos');
$videoId = JRequest::getVar('videoid', '', 'GET');
$groupId = JRequest::getVar('groupid', '', 'GET');
$video = JTable::getInstance('Video', 'CTable');
$video->load($videoId);
$video->loadExtra();
CFactory::load('helpers', 'owner');
$user = CFactory::getUser($video->creator);
$blocked = $user->isBlocked();
if ($blocked && !COwnerHelper::isCommunityAdmin()) {
$tmpl = new CTemplate();
echo $tmpl->fetch('profile.blocked');
return;
}
if (empty($videoId)) {
$url = CRoute::_('index.php?option=com_community&view=videos', false);
$mainframe->redirect($url, JText::_('COM_COMMUNITY_VIDEOS_ID_ERROR'), 'warning');
}
CFactory::load('helpers', 'group');
// Check permission
if (!CGroupHelper::allowViewMedia($groupId)) {
// Set document title
$document->setTitle(JText::_('COM_COMMUNITY_RESTRICTED_ACCESS'));
$mainframe->enqueueMessage(JText::_('COM_COMMUNITY_RESTRICTED_ACCESS', 'notice'));
echo JText::_('COM_COMMUNITY_GROUPS_VIDEO_MEMBER_PERMISSION');
} else {
// Get extra properties
$video->player = $video->getViewHTML($video->getWidth(), $video->getHeight());
$video->hit();
// Get reporting html
$reportHTML = '';
CFactory::load('libraries', 'reporting');
$report = new CReportingLibrary();
$reportHTML = $report->getReportingHTML(JText::_('COM_COMMUNITY_VIDEOS_REPORT_VIDEOS'), 'videos,reportVideo', array($video->id));
// Set pathway
$pathway =& $mainframe->getPathway();
$pathway->addItem('Video', CRoute::_('index.php?option=com_community&view=videos'));
$pathway->addItem($video->title, '');
// Set the current user's active profile
CFactory::setActiveProfile($video->creator);
// Set document title
$document->setTitle($video->title);
CFactory::load('libraries', 'bookmarks');
$bookmarks = new CBookmarks($video->permalink);
$bookmarksHTML = $bookmarks->getHTML();
$tmpl = new CTemplate();
// Get the walls
CFactory::load('libraries', 'wall');
$wallContent = CWallLibrary::getWallContents('videos', $video->id, COwnerHelper::isCommunityAdmin() || $my->id == $video->creator && $my->id != 0, 10, 0);
$wallForm = '';
$viewAllLink = false;
if (JRequest::getVar('task', '', 'REQUEST') != 'app') {
$viewAllLink = CRoute::_('index.php?option=com_community&view=videos&task=app&videoid=' . $video->id . '&app=walls');
}
$wallForm = CWallLibrary::getWallInputForm($video->id, 'videos,ajaxSaveWall', 'videos,ajaxRemoveWall', $viewAllLink);
$redirectUrl = CRoute::getURI(false);
$tmpl->set('redirectUrl', $redirectUrl);
$tmpl->set('wallForm', $wallForm);
$tmpl->set('wallContent', $wallContent);
$tmpl->set('bookmarksHTML', $bookmarksHTML);
$tmpl->set('reportHTML', $reportHTML);
$tmpl->set('video', $video);
echo $tmpl->fetch('videos.video');
}
}
示例5: linkVideo
/**
* Upload a new user video.
*/
public function linkVideo()
{
CFactory::setActiveProfile();
$my = CFactory::getUser();
$config = CFactory::getConfig();
if ($my->id == 0) {
return $this->blockUnregister();
}
if (!$config->get('enableprofilevideo')) {
echo JText::_('COM_COMMUNITY_VIDEOS_PROFILE_VIDEO_DISABLE');
return;
}
$view = $this->getView('profile');
echo $view->get(__FUNCTION__);
}
示例6: editDetails
/**
* Edits a user details
*
* @access public
* @param array An associative array to display the editing of the fields
*/
function editDetails(&$data)
{
$mainframe =& JFactory::getApplication();
// access check
CFactory::setActiveProfile();
if (!$this->accessAllowed('registered')) {
return;
}
$my = CFactory::getUser();
$config = CFactory::getConfig();
$pathway =& $mainframe->getPathway();
$pathway->addItem(JText::_($my->getDisplayName()), CRoute::_('index.php?option=com_community&view=profile&userid=' . $my->id));
$pathway->addItem(JText::_('CC EDIT DETAILS'), '');
$document =& JFactory::getDocument();
$document->setTitle(JText::_('CC EDIT DETAILS'));
$js = 'assets/validate-1.5';
$js .= $config->getBool('usepackedjavascript') ? '.pack.js' : '.js';
CAssets::attach($js, 'js');
$this->showSubmenu();
$connectModel = CFactory::getModel('Connect');
$associated = $connectModel->isAssociated($my->id);
CFactory::load('helpers', 'owner');
CFactory::load('libraries', 'facebook');
$fbHtml = '';
if ($config->get('fbconnectkey') && $config->get('fbconnectsecret')) {
CFactory::load('libraries', 'facebook');
$facebook = new CFacebook();
$fbHtml = $facebook->getLoginHTML();
}
// If FIELD_GIVENNAME & FIELD_FAMILYNAME is in use
CFactory::load('helpers', 'user');
$isUseFirstLastName = CUserHelper::isUseFirstLastName();
$jConfig =& JFactory::getConfig();
CFactory::load('libraries', 'apps');
$app =& CAppPlugins::getInstance();
$appFields = $app->triggerEvent('onFormDisplay', array('jsform-profile-editdetails'));
$beforeFormDisplay = CFormElement::renderElements($appFields, 'before');
$afterFormDisplay = CFormElement::renderElements($appFields, 'after');
$tmpl = new CTemplate();
$tmpl->set('beforeFormDisplay', $beforeFormDisplay);
$tmpl->set('afterFormDisplay', $afterFormDisplay);
$tmpl->set('fbHtml', $fbHtml);
$tmpl->set('jConfig', $jConfig);
$tmpl->set('params', $data->params);
$tmpl->set('user', $my);
$tmpl->set('config', $config);
$tmpl->set('associated', $associated);
$tmpl->set('isAdmin', COwnerHelper::isCommunityAdmin());
$tmpl->set('offsetList', $data->offsetList);
$tmpl->set('isUseFirstLastName', $isUseFirstLastName);
echo $tmpl->fetch('profile.edit.details');
}
示例7: onLoginUser
/**
* This method should handle any login logic and report back to the subject
*
* @access public
* @param array holds the user data
* @param array extra options
* @return boolean True on success
* @since 1.5
*/
public function onLoginUser($user, $options)
{
$id = CUserHelper::getUserId($user['username']);
CFactory::setActiveProfile($id);
return true;
}
示例8: video
//.........这里部分代码省略.........
$pathway->addItem($group->name, CRoute::_('index.php?option=com_community&view=groups&task=viewgroup&groupid=' . $groupId));
$pathway->addItem(JText::_('COM_COMMUNITY_VIDEOS'), CRoute::_('index.php?option=com_community&view=videos&task=display&groupid=' . $groupId));
$pathway->addItem($video->getTitle(), '');
$otherVideos = $model->getGroupVideos($groupId, $cat_id, $limit);
} else {
if (!$this->isPermitted($my->id, $video->creator, $video->permissions)) {
/**
* Opengraph
*/
CHeadHelper::setType('website', JText::_('COM_COMMUNITY_RESTRICTED_ACCESS'));
$mainframe->enqueueMessage(JText::_('COM_COMMUNITY_RESTRICTED_ACCESS', 'notice'));
switch ($video->permissions) {
case '40':
$this->noAccess(JText::_('COM_COMMUNITY_VIDEOS_OWNER_ONLY', 'notice'));
break;
case '30':
$owner = CFactory::getUser($video->creator);
$this->noAccess(JText::sprintf('COM_COMMUNITY_VIDEOS_FRIEND_PERMISSION_MESSAGE', $owner->getDisplayName()));
break;
default:
$this->noAccess();
break;
}
return;
}
// Set pathway
$pathway = $mainframe->getPathway();
$pathway->addItem('Video', CRoute::_('index.php?option=com_community&view=videos'));
$pathway->addItem($video->getTitle(), '');
$filters = array('status' => 'ready', 'category_id' => $cat_id, 'creator' => $user->id, 'permissions' => $permissions, 'or_group_privacy' => 0, 'sorting' => $sorted, 'limit' => $limit);
$otherVideos = $model->getVideos($filters);
}
// Set the current user's active profile
CFactory::setActiveProfile($video->creator);
// Hit counter + 1
$video->hit();
// Get reporting html
$reportHTML = '';
$report = new CReportingLibrary();
if ($user->id != $my->id) {
$reportHTML = $report->getReportingHTML(JText::_('COM_COMMUNITY_VIDEOS_REPORT_VIDEOS'), 'videos,reportVideo', array($video->id));
}
// Get bookmark html
$bookmarks = new CBookmarks($video->getPermalink());
$bookmarksHTML = $bookmarks->getHTML();
// Get the walls
$wallContent = CWallLibrary::getWallContents('videos', $video->id, COwnerHelper::isCommunityAdmin() || $my->id == $video->creator && $my->id != 0, $config->get('stream_default_comments'), 0, 'wall/content', 'videos,video');
$wallCount = CWallLibrary::getWallCount('videos', $video->id);
$viewAllLink = CRoute::_('index.php?option=com_community&view=videos&task=app&videoid=' . $video->id . '&app=walls');
$wallViewAll = '';
if ($wallCount > $config->get('stream_default_comments')) {
$wallViewAll = CWallLibrary::getViewAllLinkHTML($viewAllLink, $wallCount);
}
$wallForm = '';
if ($this->isPermitted($my->id, $video->creator, PRIVACY_FRIENDS) || !$config->get('lockvideoswalls')) {
$wallForm = CWallLibrary::getWallInputForm($video->id, 'videos,ajaxSaveWall', 'videos,ajaxRemoveWall', $viewAllLink);
}
$redirectUrl = CRoute::getURI(false);
// Get like information.
$like = new CLike();
$likeCount = $like->getLikeCount('videos', $video->id);
$likeLiked = $like->userLiked('videos', $video->id, $my->id) === COMMUNITY_LIKE;
$tmpl = new CTemplate();
if ($video->creator_type == VIDEO_GROUP_TYPE) {
$group = JTable::getInstance('Group', 'CTable');
$group->load($groupId);
示例9: editDetails
/**
* Edits a user details
*
* @access public
* @param array An associative array to display the editing of the fields
*/
public function editDetails(&$data)
{
$mainframe = JFactory::getApplication();
// access check
CFactory::setActiveProfile();
if (!$this->accessAllowed('registered')) {
return;
}
$my = CFactory::getUser();
$config = CFactory::getConfig();
$userParams = $my->getParams();
$pathway = $mainframe->getPathway();
$pathway->addItem(JText::_($my->getDisplayName()), CRoute::_('index.php?option=com_community&view=profile&userid=' . $my->id));
$pathway->addItem(JText::_('COM_COMMUNITY_EDIT_DETAILS'), '');
/**
* Opengraph
*/
CHeadHelper::setType('website', JText::_('COM_COMMUNITY_EDIT_DETAILS'));
// $js = 'assets/validate-1.5.min.js';
// CFactory::attach($js, 'js');
$this->showSubmenu();
$connectModel = CFactory::getModel('Connect');
$associated = $connectModel->isAssociated($my->id);
$fbHtml = '';
if ($config->get('fbconnectkey') && $config->get('fbconnectsecret') && !$config->get('usejfbc')) {
//CFactory::load( 'libraries' , 'facebook' );
$facebook = new CFacebook();
$fbHtml = $facebook->getLoginHTML();
}
if ($config->get('usejfbc')) {
if (class_exists('JFBCFactory')) {
$providers = JFBCFactory::getAllProviders();
foreach ($providers as $p) {
$fbHtml .= $p->loginButton();
}
}
}
// If FIELD_GIVENNAME & FIELD_FAMILYNAME is in use
$isUseFirstLastName = CUserHelper::isUseFirstLastName();
$jConfig = JFactory::getConfig();
//CFactory::load( 'libraries' , 'apps' );
$app = CAppPlugins::getInstance();
$appFields = $app->triggerEvent('onFormDisplay', array('jsform-profile-editdetails'));
$beforeFormDisplay = CFormElement::renderElements($appFields, 'before');
$afterFormDisplay = CFormElement::renderElements($appFields, 'after');
$tmpl = new CTemplate();
echo $tmpl->set('beforeFormDisplay', $beforeFormDisplay)->set('afterFormDisplay', $afterFormDisplay)->set('fbHtml', $fbHtml)->set('fbPostStatus', $userParams->get('postFacebookStatus'))->set('jConfig', $jConfig)->set('params', $data->params)->set('user', $my)->set('config', $config)->set('associated', $associated)->set('isAdmin', COwnerHelper::isCommunityAdmin())->set('offsetList', $data->offsetList)->set('isUseFirstLastName', $isUseFirstLastName)->fetch('profile.edit.details');
}
示例10: video
//.........这里部分代码省略.........
$blocked = $user->isBlocked();
if ($blocked && !COwnerHelper::isCommunityAdmin()) {
$tmpl = new CTemplate();
echo $tmpl->fetch('profile.blocked');
return;
}
$sorted = JRequest::getVar('sort', 'latest');
$limit = JRequest::getVar('limitstart', 6);
$permissions = $my->id == 0 ? 0 : 20;
$cat_id = JRequest::getVar('cat_id', '');
$model = CFactory::getModel('videos');
if ($video->creator_type == VIDEO_GROUP_TYPE) {
CFactory::load('helpers', 'group');
if (!CGroupHelper::allowViewMedia($groupId)) {
$document->setTitle(JText::_('COM_COMMUNITY_RESTRICTED_ACCESS'));
$mainframe->enqueueMessage(JText::_('COM_COMMUNITY_RESTRICTED_ACCESS', 'notice'));
echo JText::_('COM_COMMUNITY_GROUPS_VIDEO_MEMBER_PERMISSION');
return;
}
$group =& JTable::getInstance('Group', 'CTable');
$group->load($groupId);
// Set pathway
$pathway =& $mainframe->getPathway();
$pathway->addItem(JText::_('COM_COMMUNITY_GROUPS'), CRoute::_('index.php?option=com_community&view=groups'));
$pathway->addItem($group->name, CRoute::_('index.php?option=com_community&view=groups&task=viewgroup&groupid=' . $groupId));
$pathway->addItem(JText::_('COM_COMMUNITY_VIDEOS'), CRoute::_('index.php?option=com_community&view=videos&groupid=' . $groupId));
$pathway->addItem($video->getTitle(), '');
$otherVideos = $model->getGroupVideos($groupId, $cat_id, $limit);
} else {
if (!$this->isPermitted($my->id, $video->creator, $video->permissions)) {
$document->setTitle(JText::_('COM_COMMUNITY_RESTRICTED_ACCESS'));
$mainframe->enqueueMessage(JText::_('COM_COMMUNITY_RESTRICTED_ACCESS', 'notice'));
switch ($video->permissions) {
case '40':
$this->noAccess(JText::_('COM_COMMUNITY_VIDEOS_OWNER_ONLY', 'notice'));
break;
case '30':
$owner = CFactory::getUser($video->creator);
$this->noAccess(JText::sprintf('COM_COMMUNITY_VIDEOS_FRIEND_PERMISSION_MESSAGE', $owner->getDisplayName()));
break;
default:
$this->noAccess();
break;
}
return;
}
// Set pathway
$pathway =& $mainframe->getPathway();
$pathway->addItem('Video', CRoute::_('index.php?option=com_community&view=videos'));
$pathway->addItem($video->getTitle(), '');
$filters = array('status' => 'ready', 'category_id' => $cat_id, 'creator' => $user->id, 'permissions' => $permissions, 'or_group_privacy' => 0, 'sorting' => $sorted, 'limit' => $limit);
$otherVideos = $model->getVideos($filters);
}
//var_dump($otherVideos);
// Set the current user's active profile
CFactory::setActiveProfile($video->creator);
// Hit counter + 1
$video->hit();
// Get reporting html
$reportHTML = '';
CFactory::load('libraries', 'reporting');
$report = new CReportingLibrary();
$reportHTML = $report->getReportingHTML(JText::_('COM_COMMUNITY_VIDEOS_REPORT_VIDEOS'), 'videos,reportVideo', array($video->id));
// Get bookmark html
CFactory::load('libraries', 'bookmarks');
$bookmarks = new CBookmarks($video->getPermalink());
$bookmarksHTML = $bookmarks->getHTML();
// Get the walls
CFactory::load('libraries', 'wall');
$wallContent = CWallLibrary::getWallContents('videos', $video->id, COwnerHelper::isCommunityAdmin() || $my->id == $video->creator && $my->id != 0, 10, 0);
$wallCount = CWallLibrary::getWallCount('videos', $video->id);
$viewAllLink = false;
if (JRequest::getVar('task', '', 'REQUEST') != 'app') {
$viewAllLink = CRoute::_('index.php?option=com_community&view=videos&task=app&videoid=' . $video->id . '&app=walls');
}
$wallContent .= CWallLibrary::getViewAllLinkHTML($viewAllLink, $wallCount);
$wallForm = '';
if ($this->isPermitted($my->id, $video->creator, PRIVACY_FRIENDS) || !$config->get('lockvideoswalls')) {
$wallForm = CWallLibrary::getWallInputForm($video->id, 'videos,ajaxSaveWall', 'videos,ajaxRemoveWall', $viewAllLink);
}
$redirectUrl = CRoute::getURI(false);
// Get like
CFactory::load('libraries', 'like');
$likes = new CLike();
$likesHTML = $likes->getHTML('videos', $video->id, $my->id);
$tmpl = new CTemplate();
if ($video->creator_type == VIDEO_GROUP_TYPE) {
$group =& JTable::getInstance('Group', 'CTable');
$group->load($groupId);
$document = JFactory::getDocument();
$document->addHeadLink($group->getThumbAvatar(), 'image_src', 'rel');
}
if ($video->location !== '' && $videoMapsDefault == 1) {
CFactory::load('libraries', 'mapping');
$zoomableMap = CMapping::drawZoomableMap($video->location, 220, 150);
} else {
$zoomableMap = "";
}
echo $tmpl->setMetaTags('video', $video)->set('user', $user)->set('zoomableMap', $zoomableMap)->set('likesHTML', $likesHTML)->set('redirectUrl', $redirectUrl)->set('wallForm', $wallForm)->set('wallContent', $wallContent)->set('bookmarksHTML', $bookmarksHTML)->set('reportHTML', $reportHTML)->set('video', $video)->set('otherVideos', $otherVideos)->fetch('videos.video');
}