Ejemplo n.º 1
0
 public function view($updated = false)
 {
     $this->set('locations', FileStorageLocation::getList());
     $types = array();
     $storageLocationTypes = Type::getList();
     foreach ($storageLocationTypes as $type) {
         if ($type->getHandle() == 'default') {
             continue;
         }
         $types[$type->getID()] = $type->getName();
     }
     $this->set('types', $types);
 }
Ejemplo n.º 2
0
 /**
  * Removes the storage type if no configurations exist.
  * @throws \Exception
  * @return bool
  */
 public function delete()
 {
     $list = StorageLocation::getList();
     foreach ($list as $item) {
         if ($item->getTypeObject()->getHandle() == $this->getHandle()) {
             throw new \Exception(t('Please remove all storage locations using this storage type.'));
         }
     }
     $em = \ORM::entityManager('core');
     $em->remove($this);
     $em->flush();
     return true;
 }
Ejemplo n.º 3
0
</h4>

<form method="post" data-dialog-form="file-storage" action="<?php 
echo Loader::helper('concrete/urls')->getToolsURL('files/permissions');
?>
">
<div class="help-block"><p><?php 
echo t('All versions of a file will be moved to the selected location.');
?>
</p></div>

	<?php 
$token->output('set_location_' . $f->getFileID());
echo $form->hidden('task', 'set_location');
echo $form->hidden('fID', $f->getFileID());
$locations = FileStorageLocation::getList();
foreach ($locations as $fsl) {
    ?>
    <div class="radio"><label><?php 
    echo $form->radio('fslID', $fsl->getID(), $f->getStorageLocationID() == $fsl->getID());
    ?>
 <?php 
    echo $fsl->getDisplayName();
    ?>
</label></div>
<?php 
}
?>
</form>

<div id="ccm-file-storage-buttons" style="display: none">