Home
last modified time | relevance | path

Searched refs:media_file (Results 1 – 25 of 27) sorted by relevance

12

/webtrees/resources/views/
H A Dmedia-page-details.phtml24 <?php foreach ($record->mediaFiles() as $media_file) : ?>
25 …<tr class="<?= $media_file->isPendingAddition() ? 'wt-new' : '' ?><?= $media_file->isPendingDeleti…
28 <?php if ($record->canEdit() && !$media_file->isPendingDeletion()) : ?>
30 …' => $record->tree()->name(), 'xref' => $record->xref(), 'fact_id' => $media_file->factId()]) ?>" …
38 …' => $record->tree()->name(), 'xref' => $record->xref(), 'fact_id' => $media_file->factId()])) ?>"…
51 <?php if ($media_file->isExternal()) : ?>
52 …<?= Registry::elementFactory()->make('OBJE:FILE')->labelValue($media_file->filename(), $record->tr…
54 <?php if (!$media_file->fileExists()) : ?>
56 … <?= I18N::translate('The file “%s” does not exist.', e($media_file->filename())) ?>
59 …<?= Registry::elementFactory()->make('OBJE:FILE')->labelValue($media_file->filename(), $record->tr…
[all …]
H A Dindividual-page-images.phtml41 <?php foreach ($individual_media as $n => $media_file) : ?>
43 … <?= $media_file->displayImage(200, 260, 'crop', ['class' => 'img-thumbnail img-fluid w-100']) ?>
H A Dfact.phtml90 <?php foreach ($fact->target()->mediaFiles() as $media_file) : ?>
92 <?= $media_file->displayImage(100, 100, 'contain', []) ?>
/webtrees/resources/views/modals/
H A Dmedia-file-fields.phtml21 <div class="row mb-3 <?= $media_file instanceof MediaFile ? 'd-none' : '' ?>">
42 <div class="row file-location file-location-upload mb-3 <?= $media_file instanceof MediaFile ? 'd-n…
55 …ss="row file-location file-location-upload mb-3 <?= $media_file instanceof MediaFile && $media_fil…
65 …(dirname($media_file instanceof MediaFile ? $media_file->filename() : '') === '.' ? '' : dirname($
71 …::translate('Same as uploaded file') ?>" value="<?= e(basename($media_file ? $media_file->filename…
97 <div class="row file-location file-location-url mb-3 <?= $media_file && $media_file->isExternal() ?…
102 …https://www.example.com/photo.jpeg" value="<?= e($media_file && $media_file->isExternal() ? $media…
111 …form-control" id="title" name="title" type="text" value="<?= e($media_file ? $media_file->title() …
120 …<?= (new SourceMediaType(''))->edit('type', 'type', $media_file ? $media_file->type() : '', $tree)…
H A Dedit-media-file.phtml21 …ef' => $media->xref(), 'tree' => $media->tree()->name(), 'fact_id' => $media_file->factId()])) ?>"…
25 …file-fields', ['max_upload_size' => $max_upload_size, 'media_file' => $media_file, 'media_types' =…
/webtrees/app/Factories/
H A DImageFactory.php136 …public function mediaFileResponse(MediaFile $media_file, bool $add_watermark, bool $download): Res… argument
138 $filesystem = $media_file->media()->tree()->mediaFilesystem();
139 $path = $media_file->filename();
141 if (!$add_watermark || !$media_file->isImage()) {
146 $mime_type = $media_file->mimeType();
148 … $this->createWatermark(width: $image->width(), height: $image->height(), media_file: $media_file);
171 MediaFile $media_file, argument
178 $filesystem = $media_file->media()->tree()->mediaFilesystem();
181 $path = $media_file->filename();
187 $media_file->media()->tree()->name(),
[all …]
/webtrees/app/
H A DMedia.php81 …->first(static fn (MediaFile $media_file): bool => $media_file->isImage() && !$media_file->isExter…
115 foreach ($this->mediaFiles() as $media_file) {
116 $names[] = $media_file->title();
123 foreach ($this->mediaFiles() as $media_file) {
124 $names[] = $media_file->filename();
166 foreach ($this->mediaFiles() as $media_file) {
167 if ($media_file->isImage()) {
168 return $media_file->displayImage($width, $height, $fit, $attributes);
173 $media_file = $this->mediaFiles()->first();
175 if ($media_file instanceof MediaFile) {
[all …]
/webtrees/resources/views/modules/media-list/
H A Dpage.phtml110 <?php foreach ($media_object->mediaFiles() as $media_file) : ?>
111 … <?= $media_file->displayImage(300, 200, 'contain', ['class' => 'img-fluid']) ?>
114 <?php $media_file = $media_object->mediaFiles()->first() ?> variable
115 <?php if ($media_file instanceof MediaFile) : ?>
119 if ($media_file->type() !== '') {
121 … echo $element->labelValue($media_file->type(), $media_object->tree());
132 if ($media_file->isExternal()) {
133 …echo Registry::elementFactory()->make('OBJE:FILE')->labelValue($media_file->filename(), $media_obj…
134 } elseif ($media_file->fileExists()) {
136 …echo Registry::elementFactory()->make('OBJE:FILE')->labelValue($media_file->filename(), $media_obj…
[all …]
/webtrees/app/Http/RequestHandlers/
H A DEditMediaFileAction.php87 $media_file = $media->mediaFiles()
88 ->first(static fn (MediaFile $media_file): bool => $media_file->factId() === $fact_id);
91 if ($media_file === null) {
112 $file = $media_file->filename();
116 $old = $media_file->filename();
120 if ($old !== $new && !$media_file->isExternal() && $filesystem->fileExists($old)) {
127 …slate('The media file %1$s has been renamed to %2$s.', Html::filename($media_file->filename()), Ht…
130 …e('The media file %1$s could not be renamed to %2$s.', Html::filename($media_file->filename()), Ht…
144 if ($old !== $new && !$media_file->isExternal()) {
H A DMediaFileThumbnail.php61 foreach ($media->mediaFiles() as $media_file) {
62 if ($media_file->factId() === $fact_id) {
63 if ($media_file->isExternal()) {
64 return redirect($media_file->filename());
69 $params['tree'] = $media_file->media()->tree()->name();
71 if ($media_file->signature($params) !== $params['s']) {
79 $media_file,
83 $image_factory->fileNeedsWatermark($media_file, $user)
H A DMediaFileDownload.php57 foreach ($media->mediaFiles() as $media_file) {
58 if ($media_file->factId() === $fact_id) {
59 if ($media_file->isExternal()) {
60 return redirect($media_file->filename());
63 … $watermark = $media_file->isImage() && $image_factory->fileNeedsWatermark($media_file, $user);
66 $response = $image_factory->mediaFileResponse($media_file, $watermark, $download);
H A DEditMediaFileModal.php75 foreach ($media->mediaFiles() as $media_file) {
76 if ($media_file->factId() === $fact_id) {
80 'media_file' => $media_file,
H A DIndividualPage.php105 $media_file = $media_object->firstImageFile();
106 if ($media_file instanceof MediaFile) {
107 $individual_media->add($media_file);
/webtrees/resources/views/edit/
H A Dreorder-media-files.phtml21 <?php foreach ($media->mediaFiles() as $media_file) : ?>
23 <input type="hidden" name="order[]" value="<?= $media_file->factId() ?>">
25 <?= view('edit/reorder-card-header', ['title' => e($media_file->filename())]) ?>
29 <?= $media_file->displayImage(100, 100, 'contain') ?>
30 <?= e($media_file->title()) ?>
/webtrees/app/Contracts/
H A DImageFactoryInterface.php51 …public function mediaFileResponse(MediaFile $media_file, bool $add_watermark, bool $download): Res… argument
57 MediaFile $media_file, argument
67 public function fileNeedsWatermark(MediaFile $media_file, UserInterface $user): bool; argument
72 public function thumbnailNeedsWatermark(MediaFile $media_file, UserInterface $user): bool; argument
77 public function createWatermark(int $width, int $height, MediaFile $media_file): ImageInterface; argument
/webtrees/app/Elements/
H A DXrefMedia.php87 $media_file = $media->mediaFiles()->first();
89 if ($media_file === null) {
93 $label = $media_file->displayImage(100, 100, 'contain', []);
/webtrees/app/Services/
H A DGedcomExportService.php249 $media_file = $match[1];
251 if ($media_filesystem->fileExists($media_file)) {
252 …$zip_filesystem->writeStream($media_path . $media_file, $media_filesystem->readStream($media_file)…
H A DGedcomImportService.php421 foreach ($record->mediaFiles() as $media_file) {
425 'multimedia_file_refn' => mb_substr($media_file->filename(), 0, 248),
426 'multimedia_format' => mb_substr($media_file->format(), 0, 4),
427 'source_media_type' => mb_substr($media_file->type(), 0, 15),
428 'descriptive_title' => mb_substr($media_file->title(), 0, 248),
/webtrees/resources/views/selects/
H A Dmedia.phtml12 <?php foreach ($media->mediaFiles() as $media_file) : ?>
13 <?= $media_file->displayImage(30, 40, 'crop', []) ?>&nbsp;
/webtrees/resources/views/modules/lightbox/
H A Dtab.phtml16 <?php foreach ($media->mediaFiles() as $media_file) : ?>
17 …<?= $media_file->displayImage(100, 100, 'contain', ['class' => 'img-thumbnail wt-album-tab-image']…
/webtrees/app/Report/
H A DPdfRenderer.php508 * @param MediaFile $media_file
519 MediaFile $media_file, argument
527 return new ReportPdfImage('@' . $media_file->fileContents(), $x, $y, $w, $h, $align, $ln);
H A DReportParserGenerate.php1714 $media_file = $person->findHighlightedMediaFile();
1716 if ($media_file instanceof MediaFile && $media_file->fileExists()) {
1717 $image = imagecreatefromstring($media_file->fileContents());
1730 …$image = $this->report_root->createImageFromObject($media_file, $left, $top, $width, $height, $ali…
1766 $media_file = $mediaobject->firstImageFile();
1768 if ($media_file instanceof MediaFile && $media_file->fileExists()) {
1769 $image = imagecreatefromstring($media_file->fileContents());
1782 …$image = $this->report_root->createImageFromObject($media_file, $left, $top, $width, $height, $ali…
H A DHtmlRenderer.php325 * @param MediaFile $media_file
336 MediaFile $media_file, argument
344 …return new ReportHtmlImage($media_file->imageUrl((int) $w, (int) $h, 'crop'), $x, $y, $w, $h, $ali…
H A DAbstractRenderer.php289 * @param MediaFile $media_file
300 MediaFile $media_file, argument
/webtrees/resources/views/lists/
H A Dmedia-table.phtml93 <?php foreach ($media_object->mediaFiles() as $media_file) : ?>
94 <?= $media_file->displayImage(100, 100, 'contain', []) ?>

12