本文整理汇总了PHP中Permissions::canAddFileType方法的典型用法代码示例。如果您正苦于以下问题:PHP Permissions::canAddFileType方法的具体用法?PHP Permissions::canAddFileType怎么用?PHP Permissions::canAddFileType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Permissions
的用法示例。
在下文中一共展示了Permissions::canAddFileType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: t
?>
<h1><?php echo t('Copy Files')?></h1>
<?php if ($fcnt == 0) { ?>
<?php echo t("You do not have permission to copy any of the selected files."); ?>
<?php } else { ?>
<?php echo t('Are you sure you want to copy the following files?')?><br/><br/>
<form id="ccm-<?php echo $searchInstance?>-duplicate-form" method="post" action="<?php echo REL_DIR_FILES_TOOLS_REQUIRED?>/files/duplicate">
<?php echo $form->hidden('task', 'duplicate_multiple_files')?>
<table border="0" cellspacing="0" cellpadding="0" width="100%" class="ccm-results-list">
<?php foreach($files as $f) {
$fp = new Permissions($f);
if ($fp->canAddFileType($f->getExtension())) {
$fv = $f->getApprovedVersion();
if (is_object($fv)) { ?>
<?php echo $form->hidden('fID[]', $f->getFileID())?>
<tr>
<td>
<div class="ccm-file-list-thumbnail">
<div class="ccm-file-list-thumbnail-image" fID="<?php echo $f->getFileID()?>"><table border="0" cellspacing="0" cellpadding="0" height="70" width="100%"><tr><td align="center" fID="<?php echo $f->getFileID()?>" style="padding: 0px"><?php echo $fv->getThumbnail(1)?></td></tr></table></div>
</div>
</td>
<td><?php echo $fv->getType()?></td>
<td class="ccm-file-list-filename" width="100%"><div style="width: 150px; word-wrap: break-word"><?php echo $fv->getTitle()?></td>
<td><?php echo date(DATE_APP_DASHBOARD_SEARCH_RESULTS_FILES, strtotime($f->getDateAdded()))?></td>
示例2: checkbox
<? $s1 = FileSet::getMySets(); ?>
<? if (count($s1) > 0) { ?>
<div class="clearfix">
<ul class="inputs-list">
<? foreach($sets as $s) {
$displaySet = true;
$pf = new Permissions($s);
if (!$pf->canAddFiles()) {
$displaySet = false;
} else {
foreach($extensions as $ext) {
if (!$pf->canAddFileType($ext)) {
$displaySet = false;
}
}
}
if ($displaySet) {
?>
<li class="ccm-file-set-add-cb">
<label>
<?php
echo checkbox('fsID', $s->getFileSetID(), $s->state);
?>
<span><?php
echo $s->getFileSetName();
示例3: die
<?php
defined('C5_EXECUTE') or die("Access Denied.");
?>
<form method="post" data-dialog-form="save-file-set" action="<?php
echo $controller->action('submit');
?>
">
<div class="ccm-ui">
<?php
Loader::element('files/add_to_sets', array('displayFileSet' => function ($fileset) use($f) {
$fp = new \Permissions($fileset);
if (!$fp->canAddFiles() || !$fp->canAddFileType(strtolower($f->getExtension()))) {
return false;
} else {
return true;
}
}, 'getCheckbox' => function ($fileset) use($f) {
$checkbox = id(new HtmlObject\Input('checkbox', 'fsID[]'))->value($fileset->getFileSetID());
if ($f->inFileSet($fileset)) {
$checkbox->checked(true);
}
return $checkbox;
}));
?>
</div>
<div class="dialog-buttons">
<button class="btn btn-default pull-left" data-dialog-action="cancel"><?php