本文整理汇总了PHP中SJB_System::isUserAccessThisPage方法的典型用法代码示例。如果您正苦于以下问题:PHP SJB_System::isUserAccessThisPage方法的具体用法?PHP SJB_System::isUserAccessThisPage怎么用?PHP SJB_System::isUserAccessThisPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SJB_System
的用法示例。
在下文中一共展示了SJB_System::isUserAccessThisPage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isAccessible
public function isAccessible()
{
$listingTypeID = SJB_Array::get($this->params, 'listing_type_id');
if ($listingTypeID) {
$permissionLabel = 'view_' . strtolower($listingTypeID) . '_search_results';
$this->setPermissionLabel($permissionLabel);
}
return parent::isAccessible() && SJB_System::isUserAccessThisPage();
}
示例2: isAccessible
/**
* @return bool
*/
public function isAccessible()
{
$listingTypeID = SJB_Array::get($this->params, 'listing_type_id');
if ($listingTypeID) {
$permissionLabel = 'open_' . strtolower($listingTypeID) . '_search_form';
$this->setPermissionLabel($permissionLabel);
$form_template = SJB_Array::get($this->params, 'form_template');
if ($listingTypeID === 'Job') {
if (!parent::isAccessible() && !isset($form_template) && !SJB_System::isUserAccessThisPage()) {
return false;
} elseif ($form_template == 'quick_search.tpl') {
return true;
}
}
}
return parent::isAccessible() && SJB_System::isUserAccessThisPage();
}
示例3: isAccessible
public function isAccessible()
{
$listingTypeID = SJB_Array::get($this->params, 'listing_type_id');
if ($listingTypeID) {
$permissionLabel = 'view_' . strtolower($listingTypeID) . '_details';
$this->setPermissionLabel($permissionLabel);
$allow = parent::isAccessible() && SJB_System::isUserAccessThisPage();
$listingID = SJB_Request::getVar('listing_id', false);
$passedParametersViaUri = SJB_Request::getVar('passed_parameters_via_uri', false);
if (!$listingID && $passedParametersViaUri) {
$passedParametersViaUri = SJB_UrlParamProvider::getParams();
if (isset($passedParametersViaUri[0])) {
$listingID = $passedParametersViaUri[0];
}
}
if (SJB_UserManager::isUserLoggedIn()) {
$currentUser = SJB_UserManager::getCurrentUser();
if (!$allow && $listingID) {
$pageID = SJB_PageManager::getPageParentURI(SJB_Navigator::getURI(), SJB_System::getSystemSettings('SYSTEM_ACCESS_TYPE'), false);
$pageHasBeenVisited = SJB_ContractManager::isPageViewed($currentUser->getSID(), $pageID, $listingID);
if ($pageHasBeenVisited || strpos($pageID, 'print') !== false) {
$allow = true;
}
}
if (!$allow && 'Resume' == $listingTypeID && $listingID) {
// if view resume not allowed by ACL, check applications table
// for current resume ID, applied for one of current user jobs
// if present in applications - allow current user to view resume
// check for all jobs of current user
$cuJobs = SJB_ListingManager::getListingsByUserSID($currentUser->getSID());
$listingSids = array();
foreach ($cuJobs as $job) {
$listingSids[] = $job->getSID();
}
if (!empty($listingSids)) {
$result = SJB_DB::query('SELECT * FROM `applications` WHERE `resume` = ?n AND `listing_id` IN (?l) LIMIT 1', $listingID, $listingSids);
if (!empty($result)) {
$allow = true;
}
}
}
}
return $allow;
}
return parent::isAccessible() && SJB_System::isUserAccessThisPage();
}