本文整理汇总了PHP中Permissions::canEditFileProperties方法的典型用法代码示例。如果您正苦于以下问题:PHP Permissions::canEditFileProperties方法的具体用法?PHP Permissions::canEditFileProperties怎么用?PHP Permissions::canEditFileProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Permissions
的用法示例。
在下文中一共展示了Permissions::canEditFileProperties方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update_thumbnail
public function update_thumbnail()
{
if ($this->validateAction()) {
$fp = new Permissions($this->file);
if ($fp->canEditFileProperties()) {
$fv = $this->file->getVersionToModify();
$sr = new FileEditResponse();
$sr->setFile($this->file);
$sr->setMessage(t('File updated successfully.'));
$sr->setAdditionalDataAttribute('value', $value);
$sr->outputJSON();
} else {
throw new Exception(t('Access Denied.'));
}
} else {
throw new Exception(t('Access Denied.'));
}
}
示例2: Permissions
Loader::model("file_attributes");
$previewMode = false;
$f = File::getByID($_REQUEST['fID']);
$fp = new Permissions($f);
if (!$fp->canViewFileInFileManager()) {
die(t("Access Denied."));
}
if (isset($_REQUEST['fvID'])) {
$fv = $f->getVersion($_REQUEST['fvID']);
} else {
$fv = $f->getApprovedVersion();
}
if ($_REQUEST['task'] == 'preview_version') {
$previewMode = true;
}
if ($_POST['task'] == 'approve_version' && $fp->canEditFileProperties() && !$previewMode) {
$fv->approve();
exit;
}
if ($_POST['task'] == 'delete_version' && $fp->canEditFileContents() && !$previewMode) {
$fv->delete();
exit;
}
if ($_POST['task'] == 'update_core' && $fp->canEditFileProperties() && !$previewMode) {
$fv = $f->getVersionToModify();
switch ($_POST['attributeField']) {
case 'fvTitle':
$text = $_POST['fvTitle'];
$fv->updateTitle($text);
print $text;
break;
示例3: t
echo $fsl->getDisplayName();
?>
</div>
</div>
<?php
}
}
?>
<div class="row">
<div class="col-md-2"><p><?php
echo t('Title');
?>
</p></div>
<div class="col-md-10"><p><span
<?php
if ($fp->canEditFileProperties()) {
?>
data-editable-field-type="xeditable"
data-type="text" data-name="fvTitle"<?php
}
?>
><?php
echo h($fv->getTitle());
?>
</span></p></div>
</div>
<div class="row">
<div class="col-md-2"><p><?php
echo t('Description');
?>
</p></div>
示例4: t
$fv->getAuthorName(),
$dh->formatDateTime($f->getDateAdded(), true)) ?></p></div>
</div>
<?
$fsl = $f->getFileStorageLocationObject();
if (is_object($fsl)) { ?>
<div class="row">
<div class="col-md-3"><p><?= t('Storage Location') ?></p></div>
<div class="col-md-9"><p><?= $fsl->getDisplayName() ?></div>
</div>
<? } ?>
<? } ?>
<div class="row">
<div class="col-md-3"><p><?= t('Title') ?></p></div>
<div class="col-md-9"><p><span
<? if ($fp->canEditFileProperties()) { ?>data-editable-field-type="xeditable"
data-type="text" data-name="fvTitle"<? } ?>><?= h($fv->getTitle()) ?></span></p></div>
</div>
<div class="row">
<div class="col-md-3"><p><?= t('Description') ?></p></div>
<div class="col-md-9"><p><span
<? if ($fp->canEditFileProperties()) { ?>data-editable-field-type="xeditable"
data-type="textarea" data-name="fvDescription"<? } ?>><?= h(
$fv->getDescription()) ?></span></p></div>
</div>
<div class="row">
<div class="col-md-3"><p><?= t('Tags') ?></p></div>
<div class="col-md-9"><p><span
<? if ($fp->canEditFileProperties()) { ?>data-editable-field-type="xeditable"
data-type="textarea" data-name="fvTags"<? } ?>><?= h($fv->getTags()) ?></span></p></div>
</div>