本文整理匯總了PHP中TaskPermission::canViewNewsflow方法的典型用法代碼示例。如果您正苦於以下問題:PHP TaskPermission::canViewNewsflow方法的具體用法?PHP TaskPermission::canViewNewsflow怎麽用?PHP TaskPermission::canViewNewsflow使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TaskPermission
的用法示例。
在下文中一共展示了TaskPermission::canViewNewsflow方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: die
<?php
defined('C5_EXECUTE') or die("Access Denied.");
$tp = new TaskPermission();
if ($tp->canViewNewsflow()) {
Loader::library('newsflow');
if (Loader::helper('validation/numbers')->integer($_REQUEST['cID'])) {
$ed = Newsflow::getEditionByID($_REQUEST['cID']);
if (is_object($ed)) {
print $ed->getContent();
}
} else {
if (isset($_REQUEST['cPath'])) {
$ed = Newsflow::getEditionByPath($_REQUEST['cPath']);
if (is_object($ed)) {
print $ed->getContent();
}
}
}
}
示例2: showNewsflowOverlay
public function showNewsflowOverlay()
{
$tp = new TaskPermission();
$c = Page::getCurrentPage();
if (MOBILE_THEME_IS_ACTIVE == false && ENABLE_NEWSFLOW_OVERLAY == true && $tp->canViewNewsflow() && $c->getCollectionPath() != '/dashboard/news') {
$u = new User();
$nf = $u->config('NEWSFLOW_LAST_VIEWED');
if ($nf == 'FIRSTRUN') {
return false;
}
if (Config::get('SITE_MAINTENANCE_MODE')) {
return false;
}
if (!$nf) {
return true;
}
if (time() - $nf > NEWSFLOW_VIEWED_THRESHOLD) {
return true;
}
}
return false;
}
示例3: showNewsflowOverlay
/**
* @return bool
*/
public function showNewsflowOverlay()
{
$tp = new \TaskPermission();
$c = Page::getCurrentPage();
if (Config::get('concrete.external.news_overlay') && $tp->canViewNewsflow() && $c->getCollectionPath() != '/dashboard/news') {
$u = new ConcreteUser();
$nf = $u->config('NEWSFLOW_LAST_VIEWED');
if ($nf == 'FIRSTRUN') {
return false;
}
if (Config::get('concrete.maintenance_mode') && !PermissionKey::getByHandle('view_in_maintenance_mode')->validate()) {
return false;
}
if (!$nf) {
return true;
}
if (time() - $nf > NEWSFLOW_VIEWED_THRESHOLD) {
return true;
}
}
return false;
}
示例4: showNewsflowOverlay
public function showNewsflowOverlay()
{
$tp = new \TaskPermission();
$c = Page::getCurrentPage();
if ((!defined(MOBILE_THEME_IS_ACTIVE) || MOBILE_THEME_IS_ACTIVE == false) && Config::get('concrete.core.news_overlay') && $tp->canViewNewsflow() && $c->getCollectionPath() != '/dashboard/news') {
$u = new ConcreteUser();
$nf = $u->config('NEWSFLOW_LAST_VIEWED');
if ($nf == 'FIRSTRUN') {
return false;
}
if (Config::get('concrete.maintenance_mode')) {
return false;
}
if (!$nf) {
return true;
}
if (time() - $nf > NEWSFLOW_VIEWED_THRESHOLD) {
return true;
}
}
return false;
}