SproutCMS

This is the code documentation for the SproutCMS project

class FileConstants

A bunch of different constants

Source code (40 results)

/modules/Welcome/Controllers/WelcomeController.php   Highlighted file source

Line 29: use Sprout\Helpers\FileConstants;
Line 695: $data['type'] = FileConstants::TYPE_IMAGE;
Line 709: File::postUploadProcessing("{$file_id}_{$filename}", $file_id, FileConstants::TYPE_IMAGE);

/sprout/Controllers/Admin/FileAdminController.php   Highlighted file source

Line 33: use Sprout\Helpers\FileConstants;
Line 79: 'Type' => [new ColModifierLookupArray(FileConstants::$type_names), 'type'],
Line 93: $this->refine_bar->addWidget(new RefineWidgetSelect('type', 'Type', FileConstants::$type_names));
Line 119: if (!empty($file['type']) and $file['type'] == FileConstants::TYPE_IMAGE) $list['embed_author'] = 'Embed author credit in image';
Line 309: $data['type'] = FileConstants::TYPE_OTHER;
Line 311: foreach (FileConstants::$type_exts as $type => $exts) {
Line 332: if ($data['type'] == FileConstants::TYPE_IMAGE) {
Line 400: if ($type == FileConstants::TYPE_IMAGE) {
Line 622: foreach (FileConstants::$type_exts as $type => $exts) {
Line 629: if ($file_type == 0) $file_type = FileConstants::TYPE_OTHER;
Line 703: if ($view->data['type'] == FileConstants::TYPE_IMAGE) {
Line 724: } else if ($view->data['type'] == FileConstants::TYPE_DOCUMENT) {
Line 789: $valid->addFieldError('replace', 'File must be of type: ' . FileConstants::$type_names[$file['type']]);
Line 812: if ($file['type'] == FileConstants::TYPE_DOCUMENT) {
Line 820: } else if ($file['type'] == FileConstants::TYPE_IMAGE) {
Line 845: if ($file['type'] == FileConstants::TYPE_IMAGE) {
Line 906: if ($file['type'] == FileConstants::TYPE_IMAGE) {
Line 929: } elseif ($file['type'] == FileConstants::TYPE_DOCUMENT) {
Line 938: if ($file['type'] == FileConstants::TYPE_IMAGE and $needs_regenerate_sizes) {
Line 951: if ($file['type'] == FileConstants::TYPE_IMAGE) {
Line 983: if ($file['type'] == FileConstants::TYPE_IMAGE) {
Line 1172: } else if ($file['type'] == FileConstants::TYPE_NONE) {
Line 1240: } else if ($file['type'] == FileConstants::TYPE_NONE) {
Line 1456: if ($_GET['f_type'] == FileConstants::TYPE_IMAGE or strpos(File::mimetype($row['filename']), 'image/') === 0) {

/sprout/Controllers/Admin/FileAdminController.php   Highlighted file source

Line 33: use Sprout\Helpers\FileConstants;
Line 79: 'Type' => [new ColModifierLookupArray(FileConstants::$type_names), 'type'],
Line 93: $this->refine_bar->addWidget(new RefineWidgetSelect('type', 'Type', FileConstants::$type_names));
Line 119: if (!empty($file['type']) and $file['type'] == FileConstants::TYPE_IMAGE) $list['embed_author'] = 'Embed author credit in image';
Line 309: $data['type'] = FileConstants::TYPE_OTHER;
Line 311: foreach (FileConstants::$type_exts as $type => $exts) {
Line 332: if ($data['type'] == FileConstants::TYPE_IMAGE) {
Line 400: if ($type == FileConstants::TYPE_IMAGE) {
Line 622: foreach (FileConstants::$type_exts as $type => $exts) {
Line 629: if ($file_type == 0) $file_type = FileConstants::TYPE_OTHER;
Line 703: if ($view->data['type'] == FileConstants::TYPE_IMAGE) {
Line 724: } else if ($view->data['type'] == FileConstants::TYPE_DOCUMENT) {
Line 789: $valid->addFieldError('replace', 'File must be of type: ' . FileConstants::$type_names[$file['type']]);
Line 812: if ($file['type'] == FileConstants::TYPE_DOCUMENT) {
Line 820: } else if ($file['type'] == FileConstants::TYPE_IMAGE) {
Line 845: if ($file['type'] == FileConstants::TYPE_IMAGE) {
Line 906: if ($file['type'] == FileConstants::TYPE_IMAGE) {
Line 929: } elseif ($file['type'] == FileConstants::TYPE_DOCUMENT) {
Line 938: if ($file['type'] == FileConstants::TYPE_IMAGE and $needs_regenerate_sizes) {
Line 951: if ($file['type'] == FileConstants::TYPE_IMAGE) {
Line 983: if ($file['type'] == FileConstants::TYPE_IMAGE) {
Line 1172: } else if ($file['type'] == FileConstants::TYPE_NONE) {
Line 1240: } else if ($file['type'] == FileConstants::TYPE_NONE) {
Line 1456: if ($_GET['f_type'] == FileConstants::TYPE_IMAGE or strpos(File::mimetype($row['filename']), 'image/') === 0) {

/sprout/Controllers/Admin/PageAdminController.php   Highlighted file source

Line 40: use Sprout\Helpers\FileConstants;
Line 693: $update_fields['type'] = FileConstants::TYPE_IMAGE;

/sprout/Controllers/Admin/PageAdminController.php   Highlighted file source

Line 40: use Sprout\Helpers\FileConstants;
Line 693: $update_fields['type'] = FileConstants::TYPE_IMAGE;

/sprout/Controllers/FileController.php   Highlighted file source

Line 23: use Sprout\Helpers\FileConstants;
Line 152: foreach (FileConstants::$image_ratios as $orient_name => $orient_ratio) {

/sprout/Controllers/FileController.php   Highlighted file source

Line 23: use Sprout\Helpers\FileConstants;
Line 152: foreach (FileConstants::$image_ratios as $orient_name => $orient_ratio) {

/sprout/Controllers/FileUploadController.php   Highlighted file source

Line 21: use Sprout\Helpers\FileConstants;
Line 370: if ($data['type'] == FileConstants::TYPE_IMAGE) {

/sprout/Controllers/FileUploadController.php   Highlighted file source

Line 21: use Sprout\Helpers\FileConstants;
Line 370: if ($data['type'] == FileConstants::TYPE_IMAGE) {

/sprout/Controllers/Tinymce4Controller.php   Highlighted file source

Line 25: use Sprout\Helpers\FileConstants;
Line 104: $res = Pdb::q($q, [FileConstants::TYPE_IMAGE], 'pdo');
Line 140: $res = Pdb::q($q, [$category_id, FileConstants::TYPE_IMAGE], 'pdo');
Line 174: $res = Pdb::q($q, [FileConstants::TYPE_IMAGE, $safe_key, $safe_key], 'pdo');
Line 394: $res = Pdb::q($q, [FileConstants::TYPE_VIDEO], 'pdo');
Line 431: $res = Pdb::q($q, [FileConstants::TYPE_VIDEO, $category_id], 'pdo');
Line 465: $res = Pdb::q($q, [FileConstants::TYPE_VIDEO, $safe_key, $safe_key], 'pdo');
Line 501: $view->f_type = FileConstants::TYPE_IMAGE;
Line 505: $view->f_type = FileConstants::TYPE_VIDEO;
Line 509: $view->f_type = FileConstants::TYPE_DOCUMENT;
Line 548: $categories = Pdb::q($q, [FileConstants::TYPE_IMAGE], 'arr');

/sprout/Controllers/Tinymce4Controller.php   Highlighted file source

Line 25: use Sprout\Helpers\FileConstants;
Line 104: $res = Pdb::q($q, [FileConstants::TYPE_IMAGE], 'pdo');
Line 140: $res = Pdb::q($q, [$category_id, FileConstants::TYPE_IMAGE], 'pdo');
Line 174: $res = Pdb::q($q, [FileConstants::TYPE_IMAGE, $safe_key, $safe_key], 'pdo');
Line 394: $res = Pdb::q($q, [FileConstants::TYPE_VIDEO], 'pdo');
Line 431: $res = Pdb::q($q, [FileConstants::TYPE_VIDEO, $category_id], 'pdo');
Line 465: $res = Pdb::q($q, [FileConstants::TYPE_VIDEO, $safe_key, $safe_key], 'pdo');
Line 501: $view->f_type = FileConstants::TYPE_IMAGE;
Line 505: $view->f_type = FileConstants::TYPE_VIDEO;
Line 509: $view->f_type = FileConstants::TYPE_DOCUMENT;
Line 548: $categories = Pdb::q($q, [FileConstants::TYPE_IMAGE], 'arr');

/sprout/Helpers/AttrEditorImage.php   Highlighted file source

Line 34: return Fb::fileSelector('value', [], ['required' => true, 'filter' => FileConstants::TYPE_IMAGE]);

/sprout/Helpers/AttrEditorImage.php   Highlighted file source

Line 34: return Fb::fileSelector('value', [], ['required' => true, 'filter' => FileConstants::TYPE_IMAGE]);

/sprout/Helpers/Fb.php   Highlighted file source

Line 512: if ($type == FileConstants::TYPE_IMAGE) {
Line 602: * 'filter': (int) One of the filters, e.g. {@see FileConstants}::TYPE_IMAGE
Line 638: if ($options['filter'] == FileConstants::TYPE_IMAGE or strpos(File::mimetype($value), 'image/') === 0) {
Line 1711: * 'filter': (int) One of the filters, e.g. {@see FileConstants}::TYPE_IMAGE

/sprout/Helpers/Fb.php   Highlighted file source

Line 512: if ($type == FileConstants::TYPE_IMAGE) {
Line 602: * 'filter': (int) One of the filters, e.g. {@see FileConstants}::TYPE_IMAGE
Line 638: if ($options['filter'] == FileConstants::TYPE_IMAGE or strpos(File::mimetype($value), 'image/') === 0) {
Line 1711: * 'filter': (int) One of the filters, e.g. {@see FileConstants}::TYPE_IMAGE

/sprout/Helpers/File.php   Highlighted file source

Line 93: * @return int One of the FileConstants::TYPE_* values, see {@see FileConstants}.
Line 94: * If the type couldn't be determined, FileConstants::TYPE_OTHER is returned.
Line 99: foreach (FileConstants::$type_exts as $type => $exts) {
Line 102: return FileConstants::TYPE_OTHER;
Line 1034: * @param int $file_type The new file type - e.g. DOCUMENT or IMAGE; see FileConstants
Line 1045: case FileConstants::TYPE_DOCUMENT:
Line 1054: case FileConstants::TYPE_IMAGE:

/sprout/Helpers/LinkSpecDocument.php   Highlighted file source

Line 17: use Sprout\Helpers\FileConstants;
Line 62: return Form::fileselector($field_name, ['filter' => FileConstants::TYPE_DOCUMENT]);

/sprout/Helpers/RteLibraryDocuments.php   Highlighted file source

Line 49: $res = Pdb::query($q, [FileConstants::TYPE_DOCUMENT], 'pdo');
Line 68: $res = Pdb::query($q, [$cat_id, FileConstants::TYPE_DOCUMENT], 'pdo');
Line 104: $params = [FileConstants::TYPE_DOCUMENT];

/sprout/Helpers/RteLibraryDocuments.php   Highlighted file source

Line 49: $res = Pdb::query($q, [FileConstants::TYPE_DOCUMENT], 'pdo');
Line 68: $res = Pdb::query($q, [$cat_id, FileConstants::TYPE_DOCUMENT], 'pdo');
Line 104: $params = [FileConstants::TYPE_DOCUMENT];

/sprout/Helpers/RteLibraryImages.php   Highlighted file source

Line 52: $res = Pdb::query($q, [FileConstants::TYPE_IMAGE], 'pdo');
Line 71: $res = Pdb::query($q, [$cat_id, FileConstants::TYPE_IMAGE], 'pdo');
Line 110: $params = [FileConstants::TYPE_IMAGE];

/sprout/Helpers/RteLibrarySounds.php   Highlighted file source

Line 49: $res = Pdb::query($q, [FileConstants::TYPE_SOUND], 'pdo');
Line 68: $res = Pdb::query($q, [$cat_id, FileConstants::TYPE_SOUND], 'pdo');
Line 104: $params = [FileConstants::TYPE_SOUND];

/sprout/Helpers/WorkerRedoSizes.php   Highlighted file source

Line 34: $res = Pdb::query($q, [FileConstants::TYPE_IMAGE], 'pdo');

/sprout/Helpers/WorkerRedoSizes.php   Highlighted file source

Line 34: $res = Pdb::query($q, [FileConstants::TYPE_IMAGE], 'pdo');

/sprout/views/admin/file_add_dragdrop_form.php   Highlighted file source

Line 19: use Sprout\Helpers\FileConstants;
Line 72: <?php if ($data['type'] == FileConstants::TYPE_DOCUMENT): ?>
Line 88: <?php if ($data['type'] == FileConstants::TYPE_DOCUMENT and !empty($document_types)): ?>
Line 97: <?php if ($data['type'] == FileConstants::TYPE_IMAGE): ?>
Line 107: <?php if ($data['type'] == FileConstants::TYPE_IMAGE and !empty($shrink_original)): ?>
Line 128: <div class="field-label"><?php echo Enc::html(FileConstants::$type_names[$data['type']]); ?></div>
Line 146: <?php if ($data['type'] == FileConstants::TYPE_SOUND): ?>
Line 152: <?php if ($data['type'] == FileConstants::TYPE_VIDEO): ?>

/sprout/views/admin/file_add_dragdrop_form.php   Highlighted file source

Line 19: use Sprout\Helpers\FileConstants;
Line 72: <?php if ($data['type'] == FileConstants::TYPE_DOCUMENT): ?>
Line 88: <?php if ($data['type'] == FileConstants::TYPE_DOCUMENT and !empty($document_types)): ?>
Line 97: <?php if ($data['type'] == FileConstants::TYPE_IMAGE): ?>
Line 107: <?php if ($data['type'] == FileConstants::TYPE_IMAGE and !empty($shrink_original)): ?>
Line 128: <div class="field-label"><?php echo Enc::html(FileConstants::$type_names[$data['type']]); ?></div>
Line 146: <?php if ($data['type'] == FileConstants::TYPE_SOUND): ?>
Line 152: <?php if ($data['type'] == FileConstants::TYPE_VIDEO): ?>

/sprout/views/admin/file_contents_thumbs.php   Highlighted file source

Line 19: use Sprout\Helpers\FileConstants;
Line 39: if ($row['type'] == FileConstants::TYPE_IMAGE) {
Line 43: if($row['type'] == FileConstants::TYPE_DOCUMENT) {
Line 45: } elseif($row['type'] == FileConstants::TYPE_SOUND) {
Line 47: } elseif($row['type'] == FileConstants::TYPE_VIDEO) {
Line 49: } elseif($row['type'] == FileConstants::TYPE_OTHER) {
Line 54: echo '<div class="image-link__placeholder"><div class="image-link__placeholder__content"><div class="image-link__placeholder__icon icon-before ' . $placeholderIcon . '"></div>', FileConstants::$type_names[$row['type']], '</div></div>';

/sprout/views/admin/file_contents_thumbs.php   Highlighted file source

Line 19: use Sprout\Helpers\FileConstants;
Line 39: if ($row['type'] == FileConstants::TYPE_IMAGE) {
Line 43: if($row['type'] == FileConstants::TYPE_DOCUMENT) {
Line 45: } elseif($row['type'] == FileConstants::TYPE_SOUND) {
Line 47: } elseif($row['type'] == FileConstants::TYPE_VIDEO) {
Line 49: } elseif($row['type'] == FileConstants::TYPE_OTHER) {
Line 54: echo '<div class="image-link__placeholder"><div class="image-link__placeholder__content"><div class="image-link__placeholder__icon icon-before ' . $placeholderIcon . '"></div>', FileConstants::$type_names[$row['type']], '</div></div>';

/sprout/views/admin/file_edit.php   Highlighted file source

Line 21: use Sprout\Helpers\FileConstants;
Line 30: if ($data['type'] == FileConstants::TYPE_IMAGE) {
Line 40: <?php if ($data['type'] == FileConstants::TYPE_IMAGE): ?>
Line 65: <?php if ($data['type'] == FileConstants::TYPE_DOCUMENT): ?>
Line 90: <?php if ($data['type'] == FileConstants::TYPE_IMAGE): ?><th>Image dimensions</th><?php endif; ?>
Line 95: <td><?= Enc::html(FileConstants::$type_names[$data['type']]); ?></td>
Line 96: <?php if ($data['type'] == FileConstants::TYPE_IMAGE): ?><td><?= Enc::html($img_dimensions); ?></td><?php endif; ?>
Line 104: <?php if ($data['type'] == FileConstants::TYPE_IMAGE): ?>
Line 138: <?php elseif ($data['type'] == FileConstants::TYPE_DOCUMENT and $data['plaintext']): ?>
Line 144: <?php if ($data['type'] == FileConstants::TYPE_IMAGE): ?>
Line 219: <p>Replacement file must be of the type <b><?php echo FileConstants::$type_names[$data['type']]; ?></b>.</p>

/sprout/views/admin/file_edit.php   Highlighted file source

Line 21: use Sprout\Helpers\FileConstants;
Line 30: if ($data['type'] == FileConstants::TYPE_IMAGE) {
Line 40: <?php if ($data['type'] == FileConstants::TYPE_IMAGE): ?>
Line 65: <?php if ($data['type'] == FileConstants::TYPE_DOCUMENT): ?>
Line 90: <?php if ($data['type'] == FileConstants::TYPE_IMAGE): ?><th>Image dimensions</th><?php endif; ?>
Line 95: <td><?= Enc::html(FileConstants::$type_names[$data['type']]); ?></td>
Line 96: <?php if ($data['type'] == FileConstants::TYPE_IMAGE): ?><td><?= Enc::html($img_dimensions); ?></td><?php endif; ?>
Line 104: <?php if ($data['type'] == FileConstants::TYPE_IMAGE): ?>
Line 138: <?php elseif ($data['type'] == FileConstants::TYPE_DOCUMENT and $data['plaintext']): ?>
Line 144: <?php if ($data['type'] == FileConstants::TYPE_IMAGE): ?>
Line 219: <p>Replacement file must be of the type <b><?php echo FileConstants::$type_names[$data['type']]; ?></b>.</p>

/sprout/views/admin/page_edit.php   Highlighted file source

Line 20: use Sprout\Helpers\FileConstants;
Line 97: echo Form::fileSelector('banner', [], ['filter' => FileConstants::TYPE_IMAGE]);
Line 103: echo Form::fileSelector('gallery_thumb', [], ['filter' => FileConstants::TYPE_IMAGE]);

/sprout/views/admin/page_edit.php   Highlighted file source

Line 20: use Sprout\Helpers\FileConstants;
Line 97: echo Form::fileSelector('banner', [], ['filter' => FileConstants::TYPE_IMAGE]);
Line 103: echo Form::fileSelector('gallery_thumb', [], ['filter' => FileConstants::TYPE_IMAGE]);

/sprout/views/admin/page_menu_groups.php   Highlighted file source

Line 19: use Sprout\Helpers\FileConstants;
Line 61: echo Form::fileselector("extras[{$page_id}][image]", [], ['type' => FileConstants::TYPE_IMAGE]);

/sprout/views/admin/page_menu_groups.php   Highlighted file source

Line 19: use Sprout\Helpers\FileConstants;
Line 61: echo Form::fileselector("extras[{$page_id}][image]", [], ['type' => FileConstants::TYPE_IMAGE]);

/sprout/Widgets/AudioWidget.php   Highlighted file source

Line 17: use Sprout\Helpers\FileConstants;
Line 54: return Form::fileselector('filename', [], ['filter' => FileConstants::TYPE_SOUND, 'required' => true]);

/sprout/Widgets/AudioWidget.php   Highlighted file source

Line 17: use Sprout\Helpers\FileConstants;
Line 54: return Form::fileselector('filename', [], ['filter' => FileConstants::TYPE_SOUND, 'required' => true]);

/sprout/Widgets/FileListWidget.php   Highlighted file source

Line 16: use Sprout\Helpers\FileConstants;
Line 30: protected $default_settings = ['order' => FileConstants::ORDER_NAME];
Line 84: $out .= Form::dropdown('order', [], FileConstants::$order_names);
Line 114: 'Order' => FileConstants::$order_names[$this->settings['order']],
Line 125: case FileConstants::ORDER_NAME:
Line 128: case FileConstants::ORDER_MANUAL:
Line 131: case FileConstants::ORDER_OLDEST:
Line 134: case FileConstants::ORDER_NEWEST:

/sprout/Widgets/FileListWidget.php   Highlighted file source

Line 16: use Sprout\Helpers\FileConstants;
Line 30: protected $default_settings = ['order' => FileConstants::ORDER_NAME];
Line 84: $out .= Form::dropdown('order', [], FileConstants::$order_names);
Line 114: 'Order' => FileConstants::$order_names[$this->settings['order']],
Line 125: case FileConstants::ORDER_NAME:
Line 128: case FileConstants::ORDER_MANUAL:
Line 131: case FileConstants::ORDER_OLDEST:
Line 134: case FileConstants::ORDER_NEWEST:

/sprout/Widgets/ImageGalleryWidget.php   Highlighted file source

Line 18: use Sprout\Helpers\FileConstants;
Line 217: $cats = Pdb::query($q, [FileConstants::TYPE_IMAGE], 'map');

/sprout/Widgets/ImageGalleryWidget.php   Highlighted file source

Line 18: use Sprout\Helpers\FileConstants;
Line 217: $cats = Pdb::query($q, [FileConstants::TYPE_IMAGE], 'map');

A total of 205 lines in 40 files were found