当前位置: 首页>>代码示例>>PHP>>正文


PHP Permissions::canDeleteFileSet方法代码示例

本文整理汇总了PHP中Permissions::canDeleteFileSet方法的典型用法代码示例。如果您正苦于以下问题:PHP Permissions::canDeleteFileSet方法的具体用法?PHP Permissions::canDeleteFileSet怎么用?PHP Permissions::canDeleteFileSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Permissions的用法示例。


在下文中一共展示了Permissions::canDeleteFileSet方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: delete

 public function delete($fsID, $token = '')
 {
     $u = new User();
     Loader::model('file_set');
     $fs = FileSet::getByID($fsID);
     $valt = Loader::helper('validation/token');
     if (!$valt->validate('delete_file_set', $token)) {
         throw new Exception($valt->getErrorMessage());
     }
     $fsp = new Permissions($fs);
     if ($fsp->canDeleteFileSet()) {
         $fs->delete();
         $this->redirect('/dashboard/files/sets', 'file_set_deleted');
     } else {
         throw new Exception(t('You do not have permission to delete this file set.'));
     }
 }
开发者ID:Zyqsempai,项目名称:amanet,代码行数:17,代码来源:sets.php

示例2: t

			<p><?php 
        echo t('There are no files in this set.');
        ?>
</p>
		<?php 
    }
    ?>
	</div>
	</div>
	<div class="ccm-pane-footer">
		<input type="submit" value="<?php 
    echo t('Save');
    ?>
" class="btn primary ccm-button-v2-right" />
		<?php 
    if ($fsp->canDeleteFileSet()) {
        ?>
			<?php 
        print $ih->button_js(t('Delete'), "deleteFileSet()", 'right', 'error');
        ?>
		<?php 
    }
    ?>
	</div>

	<?php 
    echo Loader::helper('concrete/dashboard')->getDashboardPaneFooterWrapper(false);
    ?>

	</form>
	
开发者ID:ojalehto,项目名称:concrete5-legacy,代码行数:30,代码来源:sets.php

示例3: foreach

		</td>
	</tr>
	</table>
	</div>
	
		
	<div class="ccm-file-search-advanced-sets-results">
	<ul id="ccm-file-search-advanced-sets-list">
	<?php  foreach($s1 as $fs) { 
		$pfs = new Permissions($fs);
		
		?>
		<li class="ccm-<?php echo $searchInstance?>-search-advanced-sets-cb">
		<div class="ccm-file-search-advanced-set-controls">
			<a href="<?php echo View::url('/dashboard/files/sets', 'view_detail', $fs->getFileSetID())?>"><?php echo $html->image('icons/wrench.png')?></a>
			<?php  if ($pfs->canDeleteFileSet()) { ?>
				<a href="<?php echo REL_DIR_FILES_TOOLS_REQUIRED?>/files/delete_set?fsID=<?php echo $fs->getFileSetID()?>&searchInstance=<?php echo $searchInstance?>" class="ccm-file-set-delete-window" dialog-title="<?php echo t('Delete File Set')?>" dialog-width="320" dialog-height="200" dialog-modal="false"><?php echo $html->image('icons/delete_small.png')?></a>
			<?php  } ?>
		</div>
		<?php echo $form->checkbox('fsID[' . $fs->getFileSetID() . ']', $fs->getFileSetID(), (is_array($searchRequest['fsID']) && in_array($fs->getFileSetID(), $searchRequest['fsID'])))?> <?php echo $form->label('fsID[' . $fs->getFileSetID() . ']', $fs->getFileSetName())?></li>
	<?php  } ?>
	</ul>
	</div>

	<div style="padding-left: 6px; padding-top: 6px" class="ccm-note"><?php echo $form->checkbox('fsIDNone', '1', $searchRequest['fsIDNone'] == 1, array('instance' => $searchInstance))?> <?php echo $form->label('fsIDNone', t('Display files in no sets.'))?></div>
	
</div>

	<script type="text/javascript">
	$(function() {
		$('a.ccm-file-set-delete-window').dialog();
开发者ID:rii-J,项目名称:concrete5-de,代码行数:31,代码来源:search_form_sets.php

示例4: Permissions

        $pfs = new Permissions($fs);
        ?>
		<li class="ccm-<?php 
        echo $searchInstance;
        ?>
-search-advanced-sets-cb">
		<div class="ccm-file-search-advanced-set-controls">
			<a href="<?php 
        echo View::url('/dashboard/files/sets', 'view_detail', $fs->getFileSetID());
        ?>
"><?php 
        echo $html->image('icons/wrench.png');
        ?>
</a>
			<?php 
        if ($pfs->canDeleteFileSet()) {
            ?>
				<a href="<?php 
            echo REL_DIR_FILES_TOOLS_REQUIRED;
            ?>
/files/delete_set?fsID=<?php 
            echo $fs->getFileSetID();
            ?>
&searchInstance=<?php 
            echo $searchInstance;
            ?>
" dialog-append-buttons="true" class="ccm-file-set-delete-window" dialog-title="<?php 
            echo t('Delete File Set');
            ?>
" dialog-width="320" dialog-height="110" dialog-modal="false"><?php 
            echo $html->image('icons/delete_small.png');
开发者ID:ojalehto,项目名称:concrete5-legacy,代码行数:31,代码来源:search_form_sets.php

示例5: delete_files

 public function delete_files()
 {
     if (!$this->token->validate('delete_files')) {
         $this->error->add($this->token->getErrorMessage());
     }
     if (!$this->error->has()) {
         $r = $this->entityManager->getRepository('\\PortlandLabs\\Concrete5\\MigrationTool\\Entity\\Import\\Batch');
         $batch = $r->findOneById($this->request->request->get('id'));
         if (is_object($batch)) {
             foreach ($batch->getFiles() as $f) {
                 $fp = new \Permissions($f);
                 if ($fp->canDeleteFile()) {
                     $f->delete();
                 }
             }
             $fs = $batch->getFileSet();
             if (is_object($fs)) {
                 $fsp = new \Permissions($fs);
                 if ($fsp->canDeleteFileSet()) {
                     $fs->delete();
                 }
             }
             $this->flash('success', t('Batch files deleted successfully.'));
             $this->redirect('/dashboard/system/migration/import', 'batch_files', $batch->getId());
         }
     }
     $this->view();
 }
开发者ID:motoki1199,项目名称:addon_migration_tool,代码行数:28,代码来源:import.php


注:本文中的Permissions::canDeleteFileSet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。