本文整理匯總了PHP中repository::is_visible方法的典型用法代碼示例。如果您正苦於以下問題:PHP repository::is_visible方法的具體用法?PHP repository::is_visible怎麽用?PHP repository::is_visible使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類repository
的用法示例。
在下文中一共展示了repository::is_visible方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: is_visible
/**
* Return is the instance is visible
* (is the type visible ? is the context enable ?)
* @return boolean
*/
public function is_visible() {
global $COURSE; //TODO: this is deprecated (skodak)
if ($COURSE->legacyfiles != 2) {
// do not show repo if legacy files disabled in this course...
return false;
}
return parent::is_visible();
}
示例2: is_visible
/**
* We want to make sure that not only is this plugin enabled and visible but also that the remote Alfresco
* repository is currently up and running also.
*
* @return boolean
*/
public function is_visible() {
global $COURSE, $USER;
if (!parent::is_visible() || !isset($this->elis_files) || empty($this->elis_files->isrunning)) {
return false;
}
$uid = $USER->id;
$courseid = $COURSE->id;
$cid = ($courseid != SITEID) ? $courseid : 0;
$oid = 0;
$shared = (boolean)0;
// ELIS files is visible if the user has any permissions from default browsing location
return $this->elis_files->get_default_browsing_location($cid, $uid, $shared, $oid);
}