本文整理汇总了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;
}
}
}