本文整理汇总了PHP中Foundry::explorer方法的典型用法代码示例。如果您正苦于以下问题:PHP Foundry::explorer方法的具体用法?PHP Foundry::explorer怎么用?PHP Foundry::explorer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Foundry
的用法示例。
在下文中一共展示了Foundry::explorer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: explorer
/**
* Service Hook for explorer
*
* @since 1.2
* @access public
* @param string
* @return
*/
public function explorer()
{
// Check for request forgeries
Foundry::checkToken();
// Require the user to be logged in
Foundry::requireLogin();
// Get the current view
$view = $this->getCurrentView();
// Get the group object
$groupId = JRequest::getInt('uid');
$group = Foundry::group($groupId);
// Determine if the viewer can really view items
if (!$group->canViewItem()) {
return $view->call(__FUNCTION__);
}
// Load up the explorer library
$explorer = Foundry::explorer($group->id, SOCIAL_TYPE_GROUP);
$hook = JRequest::getCmd('hook');
$result = $explorer->hook($hook);
$exception = Foundry::exception('Folder retrieval successful', SOCIAL_MSG_SUCCESS);
return $view->call(__FUNCTION__, $exception, $result);
}
示例2: explorer
/**
* Service Hook for explorer
*
* @since 1.3
* @access public
* @param string
* @return
*/
public function explorer()
{
// Check for request forgeries
Foundry::checkToken();
// Require the user to be logged in
Foundry::requireLogin();
// Get the current view
$view = $this->getCurrentView();
// Get the group object
$eventId = $this->input->getint('uid');
$event = FD::event($eventId);
// Determines if the current user is a guest of this event
$guest = $event->getGuest($this->my->id);
if (!$this->my->isSiteAdmin() && $event->isInviteOnly() && !$guest->isInvited() && !$guest->isGuest()) {
$this->view->setMessage(JText::_('COM_EASYSOCIAL_EVENTS_NO_ACCESS_TO_EVENT'), SOCIAL_MSG_ERROR);
return $this->view->call(__FUNCTION__);
}
// Load up the explorer library
$explorer = Foundry::explorer($event->id, SOCIAL_TYPE_EVENT);
$hook = JRequest::getCmd('hook');
$result = $explorer->hook($hook);
$exception = Foundry::exception('Folder retrieval successful', SOCIAL_MSG_SUCCESS);
return $view->call(__FUNCTION__, $exception, $result);
}