本文整理匯總了PHP中FileData::isPublishable方法的典型用法代碼示例。如果您正苦於以下問題:PHP FileData::isPublishable方法的具體用法?PHP FileData::isPublishable怎麽用?PHP FileData::isPublishable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FileData
的用法示例。
在下文中一共展示了FileData::isPublishable方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: canAdmin
/**
* return a boolean on whether or not this department
* has admin right to the file whose ID is $data_id
* @param int $data_id
* @return bool
*/
public function canAdmin($data_id)
{
$filedata = new FileData($data_id, $this->connection);
//check to see if this department doesn't have a forbidden right or
//if this file is publishable
if (!$this->isForbidden($data_id) or !$filedata->isPublishable()) {
// return whether or not this deptartment can admin the file
if ($this->canDept($data_id, $this->ADMIN_RIGHT)) {
return true;
} else {
false;
}
}
}
示例2: canAdmin
/**
* return whether if this user can admin $data_id
* @param $data_id
* @return bool
*/
function canAdmin($data_id)
{
$filedata = new FileData($data_id, $this->connection);
if (!$this->isForbidden($data_id) or !$filedata->isPublishable()) {
if ($this->canUser($data_id, $this->ADMIN_RIGHT) or $this->dept_perms_obj->canAdmin($data_id) or $filedata->isOwner($this->id)) {
return true;
} else {
false;
}
}
}