本文整理汇总了PHP中SJB_Function类的典型用法代码示例。如果您正苦于以下问题:PHP SJB_Function类的具体用法?PHP SJB_Function怎么用?PHP SJB_Function使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SJB_Function类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: isAccessible
public function isAccessible()
{
if ($this->getAclRoleID()) {
$this->setPermissionLabel(array('subuser_add_listings', 'subuser_manage_listings'));
}
return parent::isAccessible();
}
开发者ID:Maxlander,项目名称:shixi,代码行数:7,代码来源:my_listings.php
示例2: isAccessible
public function isAccessible()
{
$passedParametersViaUri = SJB_UrlParamProvider::getParams();
$userGroupID = $passedParametersViaUri ? array_shift($passedParametersViaUri) : false;
$this->setPermissionLabel('manage_' . mb_strtolower($userGroupID, 'UTF-8'));
return parent::isAccessible();
}
开发者ID:Maxlander,项目名称:shixi,代码行数:7,代码来源:users.php
示例3: isAccessible
public function isAccessible()
{
if ($this->getAclRoleID()) {
$this->setPermissionLabel('subuser_manage_subscription');
}
return parent::isAccessible();
}
开发者ID:Maxlander,项目名称:shixi,代码行数:7,代码来源:my_invoices.php
示例4: isAccessible
public function isAccessible()
{
$network = SJB_Request::getVar('passed_parameters_via_uri');
if (empty($network)) {
$network = SJB_Request::getVar('soc_network');
}
switch ($network) {
case 'facebook':
$this->setPermissionLabel('set_linkedin_plug-in');
break;
case 'linkedin':
$this->setPermissionLabel('set_facebook_plug-in');
break;
case 'twitter':
$this->setPermissionLabel('set_twitter_plug-in');
break;
case 'googleplus':
$this->setPermissionLabel('set_googleplusplugin');
break;
case 'bitly':
$this->setPermissionLabel('social_media_bitly');
break;
default:
$this->setPermissionLabel(array('set_linkedin_plug-in', 'set_facebook_plug-in', 'set_twitter_plug-in', 'set_googleplusplugin', 'social_media_bitly'));
break;
}
return parent::isAccessible();
}
开发者ID:Maxlander,项目名称:shixi,代码行数:28,代码来源:social_media.php
示例5: isAccessible
public function isAccessible()
{
$listingTypeId = SJB_Request::getVar('listing_type_id', null);
$listingType = !in_array($listingTypeId, array('resume', 'job')) ? "{$listingTypeId}_listings" : $listingTypeId . 's';
$this->setPermissionLabel('manage_' . strtolower($listingType));
return parent::isAccessible();
}
开发者ID:Maxlander,项目名称:shixi,代码行数:7,代码来源:add_listing.php
示例6: isAccessible
public function isAccessible()
{
$userSid = SJB_Request::getVar('user_sid', null);
$userGroupID = SJB_UserGroupManager::getUserGroupIDByUserSID($userSid);
$this->setPermissionLabel('manage_' . strtolower($userGroupID));
return parent::isAccessible();
}
开发者ID:Maxlander,项目名称:shixi,代码行数:7,代码来源:pm.php
示例7: isAccessible
public function isAccessible()
{
$cu = SJB_UserManager::getCurrentUser();
if (!empty($cu) && $cu->isSubuser()) {
return false;
} else {
return parent::isAccessible();
}
}
开发者ID:Maxlander,项目名称:shixi,代码行数:9,代码来源:user_notifications.php
示例8: 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();
}
开发者ID:Maxlander,项目名称:shixi,代码行数:9,代码来源:search_results.php
示例9: isAccessible
public function isAccessible()
{
$this->searchID = SJB_Request::getVar('searchId', '');
$this->criteriaSaver = new SJB_ListingCriteriaSaver($this->searchID);
$this->criteriaData = $this->criteriaSaver->getCriteria();
$this->listingTypeID = SJB_GuestAlertManager::getListingTypeIDFromCriteria($this->criteriaData);
$this->setPermissionLabel('use_' . $this->listingTypeID . '_alerts');
return parent::isAccessible();
}
开发者ID:Maxlander,项目名称:shixi,代码行数:9,代码来源:create.php
示例10: isAccessible
public function isAccessible()
{
$listingId = SJB_Request::getVar('listing_id', null);
$listingInfo = SJB_ListingManager::getListingInfoBySID($listingId);
$listingTypeId = SJB_ListingTypeManager::getListingTypeIDBySID($listingInfo['listing_type_sid']);
$listingType = !in_array($listingTypeId, array('Resume', 'Job')) ? "{$listingTypeId}_listings" : $listingTypeId . 's';
$this->setPermissionLabel('manage_' . strtolower($listingType));
return parent::isAccessible();
}
开发者ID:Maxlander,项目名称:shixi,代码行数:9,代码来源:display_listing.php
示例11: isAccessible
public function isAccessible()
{
$plugin = SJB_Request::getVar('plugin', null);
switch ($plugin) {
case 'PhpBBBridgePlugin':
$this->setPermissionLabel('set_phpbb_plug-in');
break;
case 'LinkedinSocialPlugin':
$this->setPermissionLabel('set_linkedin_plug-in');
break;
case 'FacebookSocialPlugin':
$this->setPermissionLabel('set_facebook_plug-in');
break;
case 'WordPressBridgePlugin':
$this->setPermissionLabel('set_wordpress_plug-in');
break;
case 'TwitterIntegrationPlugin':
$this->setPermissionLabel('set_twitter_plug-in');
break;
case 'ShareThisPlugin':
$this->setPermissionLabel('set_sharethisplugin');
break;
case 'CaptchaPlugin':
$this->setPermissionLabel('set_captchaplugin');
break;
case 'IndeedPlugin':
$this->setPermissionLabel('set_indeedplugin');
break;
case 'JujuPlugin':
$this->setPermissionLabel('set_jujuplugin');
break;
case 'SimplyHiredPlugin':
$this->setPermissionLabel('set_simplyhiredplugin');
break;
case 'GooglePlusSocialPlugin':
$this->setPermissionLabel('set_googleplusplugin');
break;
case 'GoogleAnalyticsPlugin':
$this->setPermissionLabel('set_googleanalyticsplugin');
break;
case 'BeyondPlugin':
$this->setPermissionLabel('set_beyondplugin');
break;
default:
$this->setPermissionLabel(array('manage_plug-ins', 'set_phpbb_plug-in', 'set_linkedin_plug-in', 'set_facebook_plug-in', 'set_wordpress_plug-in', 'set_twitter_plug-in', 'set_sharethisplugin', 'set_captchaplugin', 'set_indeedplugin', 'set_jujuplugin', 'set_simplyhiredplugin', 'set_googleplugin', 'set_googleplusplugin', 'set_googleanalyticsplugin', 'set_beyondplugin'));
break;
}
return parent::isAccessible();
}
开发者ID:Maxlander,项目名称:shixi,代码行数:49,代码来源:plugins.php
示例12: 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();
}
开发者ID:Maxlander,项目名称:shixi,代码行数:46,代码来源:display_listing.php
示例13: 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();
}
开发者ID:Maxlander,项目名称:shixi,代码行数:20,代码来源:search_form.php
示例14: isAccessible
public function isAccessible()
{
$browseUrl = SJB_Request::getVar('browseUrl', false);
if ($browseUrl) {
$parameters = SJB_BrowseDBManager::getBrowseParametersByUri($browseUrl);
$this->parameters = array_merge($_REQUEST, unserialize($parameters));
} else {
$this->parameters = $_REQUEST;
}
$listingTypeId = SJB_Request::getVar('listing_type_id', '');
$browseManager = SJB_ObjectMother::createBrowseManager($listingTypeId, $this->parameters);
$params = $browseManager->getParams();
if (empty($params)) {
return true;
}
$this->setPermissionLabel('view_' . strtolower($listingTypeId) . '_search_results');
return parent::isAccessible();
}
开发者ID:Maxlander,项目名称:shixi,代码行数:18,代码来源:browse.php
示例15: isAccessible
public function isAccessible()
{
switch (SJB_Request::getVar('type')) {
case 'user':
$userSid = SJB_Request::getVar('role', null);
$userGroupID = SJB_UserGroupManager::getUserGroupIDByUserSID($userSid);
SJB_System::setGlobalTemplateVariable('wikiExtraParam', $userGroupID);
$this->setPermissionLabel('manage_' . strtolower($userGroupID));
break;
case 'group':
$this->setPermissionLabel('manage_user_groups_permissions');
break;
case 'product':
$this->setPermissionLabel('manage_products');
break;
}
return parent::isAccessible();
}
开发者ID:Maxlander,项目名称:shixi,代码行数:18,代码来源:acl.php
示例16: isAccessible
public function isAccessible()
{
$this->setPermissionLabel('manage_common_listing_fields');
return parent::isAccessible();
}
开发者ID:Maxlander,项目名称:shixi,代码行数:5,代码来源:delete_listing_field.php
注:本文中的SJB_Function类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论